Skip to content

Instantly share code, notes, and snippets.

Created June 13, 2016 07:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/64250544a3b41a1609778f23a5ded994 to your computer and use it in GitHub Desktop.
Save anonymous/64250544a3b41a1609778f23a5ded994 to your computer and use it in GitHub Desktop.
ubuntu@ip-10-0-0-20:~$ cat /etc/init/webdis.conf
description "webdis control"
#start on redis-server
start on [2345]
stop on [!2345]
respawn # restart when job dies
respawn limit 5 60 # give up restart after 5 respawns in 60 seconds
script
APP=/usr/local/bin/webdis
USER=redis
CONFIG=/etc/redis/webdis.json
PIDFILE=/var/run/webdis.pid
ERROR_LOG=/var/log/redis/webdis_error.log
# ulimit -n 10000
start-stop-daemon --start -c $USER -m -p $PIDFILE --exec $APP -- $CONFIG 2>> $ERROR_LOG
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment