diff --git a/config/deploy.rb b/config/deploy.rb index a228e16..f4aaa5f 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -27,8 +27,8 @@ namespace :deploy do end task :setup_config, roles: :app do - sudo "ln -nfs #{current_path}/config/nginx.conf /etc/nginx/sites-enabled/#{application}" - sudo "ln -nfs #{current_path}/config/unicorn_init.sh /etc/init.d/unicorn_#{application}" + puts "Please run as root: 'ln -nfs #{current_path}/config/nginx.conf /etc/nginx/sites-enabled/#{application}'" + puts "Please run as root: 'ln -nfs #{current_path}/config/unicorn_init.sh /etc/init.d/unicorn_#{application}'" run "mkdir -p #{shared_path}/config" end after "deploy:setup", "deploy:setup_config" diff --git a/config/unicorn_init.sh b/config/unicorn_init.sh index 8fe49b4..ab16755 100755 --- a/config/unicorn_init.sh +++ b/config/unicorn_init.sh @@ -12,7 +12,7 @@ set -e # Feel free to change any of the following variables for your app: TIMEOUT="${TIMEOUT-60}" -APP_ROOT="/home/www-data/apps/redstoner" +APP_ROOT="/home/www-data/apps/redstoner/current" PID="$APP_ROOT/tmp/pids/unicorn.pid" CMD="cd $APP_ROOT; bundle exec unicorn -D -c $APP_ROOT/config/unicorn.rb -E production" AS_USER="www-data"