roles/puma_install/templates/puma_init.j2 in taperole-2.0.6 vs roles/puma_install/templates/puma_init.j2 in taperole-2.0.7
- old
+ new
@@ -14,11 +14,10 @@
# This monit wrapper script will be called by monit as root
# Edit these variables to your liking
-RAILS_ENV={{ be_app_env }}
USER={{ deployer_user.name }}
APP_DIR={{ be_app_path }}
PUMA_CONFIG_FILE=$APP_DIR/config/puma.production.rb
PUMA_PID_FILE={{ puma_pidfile }}
PUMA_SOCKET={{ puma_sockfile }}
@@ -46,32 +45,32 @@
start)
echo "Starting puma..."
rm -f $PUMA_SOCKET
if [ -e $PUMA_CONFIG_FILE ] ; then
- echo "cd $APP_DIR && RAILS_ENV=$RAILS_ENV bundle exec puma -C $PUMA_CONFIG_FILE --daemon"
- /bin/su - $USER -c "cd $APP_DIR && RAILS_ENV=$RAILS_ENV bundle exec puma -C $PUMA_CONFIG_FILE --daemon"
+ echo "cd $APP_DIR && bundle exec puma -C $PUMA_CONFIG_FILE --daemon"
+ /bin/su - $USER -c "cd $APP_DIR && bundle exec puma -C $PUMA_CONFIG_FILE --daemon"
else
echo "ERROR: No config file found in $PUMA_CONFIG_FILE"
fi
echo "done"
;;
stop)
echo "Stopping puma..."
- echo "cd $APP_DIR && RAILS_ENV=$RAILS_ENV bundle exec pumactl stop"
- /bin/su - $USER -c "cd $APP_DIR && RAILS_ENV=$RAILS_ENV bundle exec pumactl --config-file $PUMA_CONFIG_FILE stop"
+ echo "cd $APP_DIR && bundle exec pumactl stop"
+ /bin/su - $USER -c "cd $APP_DIR && bundle exec pumactl --config-file $PUMA_CONFIG_FILE stop"
rm -f $PUMA_PID_FILE
rm -f $PUMA_SOCKET
echo "done"
;;
restart)
if puma_is_running ; then
echo "Hot-restarting puma..."
- /bin/su - $USER -c "cd $APP_DIR && RAILS_ENV=$RAILS_ENV bundle exec pumactl --config-file $PUMA_CONFIG_FILE restart"
+ /bin/su - $USER -c "cd $APP_DIR && bundle exec pumactl --config-file $PUMA_CONFIG_FILE restart"
echo "Doublechecking the process restart..."
sleep 15
if puma_is_running ; then
echo "done"