Skip to content

Instantly share code, notes, and snippets.

@sitano
Created July 30, 2015 09:24
Show Gist options
  • Save sitano/797281b93a8fe9adbe6e to your computer and use it in GitHub Desktop.
Save sitano/797281b93a8fe9adbe6e to your computer and use it in GitHub Desktop.
redis-server simple upstart script
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 3 5
kill timeout 10
limit nofile 65535 65535
setuid redis
setgid redis
script
DAEMON_ARGS=/etc/redis/redis.conf
test -x /usr/bin/redis-server || exit 0
if [ -r /etc/default/redis-server ]
then
. /etc/default/redis-server
fi
# switch off daemonization in the configuration file
exec /usr/bin/redis-server $DAEMON_ARGS
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment