#!/usr/bin/env bash
. /etc/rc.d/init.d/functions

APPNAME="<%= @name %>"
APP_DIR="<%= @directory %>"

PUMA_DIR="$APP_DIR/shared/puma"
PIDFILE="$APP_DIR/shared/pids/$APPNAME.pid"

if [ -e $PIDFILE ]; then
  echo -n "Hot Restarting $APPNAME"
  kill -USR1 $(cat $PIDFILE) && success || failure
else
  echo "$APPNAME isn't running.."
  ./puma_start.sh
fi

#!/usr/bin/env bash
. /etc/rc.d/init.d/functions

APPNAME="<%= @name %>"
APP_DIR="<%= @directory %>"

PUMA_DIR="$APP_DIR/shared/puma"
PIDFILE="$APP_DIR/shared/pids/$APPNAME.pid"

if [ -e $PIDFILE ]; then
  echo -n "Hot Restarting $APPNAME"
  kill -USR1 $(cat $PIDFILE) && success || failure
else
  echo "$APPNAME isn't running.."
  $(PUMA_DIR/puma_start.sh)
fi

Fix restart command to use the full path
Fix restart command to use the full path
