diff options
-rwxr-xr-x | config/sysvinit.example | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/config/sysvinit.example b/config/sysvinit.example index 2514fe003..f44fae986 100755 --- a/config/sysvinit.example +++ b/config/sysvinit.example @@ -24,11 +24,18 @@ test -f $DAEMON || exit 0 set -e start_daemon() { - su -l -c "cd $SITE_HOME/alaveteli && bundle exec thin -d -e production start" $USER + cd "$SITE_HOME"/alaveteli && bundle exec thin \ + --environment=production \ + --user="$USER" \ + --group="$USER" \ + --address=127.0.0.1 \ + --daemonize \ + start } stop_daemon() { - pkill -f thin -u $USER || true + cd "$SITE_HOME"/alaveteli && bundle exec thin stop +} } case "$1" in |