#!/bin/bash

# sanity check
if [[ -a /etc/supervisor/conf.d/supervisord.conf ]]; then
  exit 0
fi

# supervisor
cat > /etc/supervisor/conf.d/supervisord.conf <<EOF
[supervisord]
nodaemon=true

[program:alaveteli]
directory=/opt/alaveteli
command=bundle exec thin

[program:rsyslog]
command=/usr/sbin/rsyslogd -n -c3
EOF

cd /opt/alaveteli
bundle exec rake themes:install

#!/bin/bash

# sanity check
if [[ -a /etc/supervisor/conf.d/supervisord.conf ]]; then
  exit 0
fi

# supervisor
cat > /etc/supervisor/conf.d/supervisord.conf <<EOF
[supervisord]
nodaemon=true

[program:alaveteli]
directory=/opt/alaveteli
command=bundle exec thin

[program:rsyslog]
command=/usr/sbin/rsyslogd -n -c3
EOF

cd /opt/alaveteli
script/rails-post-deploy

Refactor to use the post-deploy script
Refactor to use the post-deploy script
