Created
July 30, 2015 09:24
-
-
Save sitano/797281b93a8fe9adbe6e to your computer and use it in GitHub Desktop.
redis-server simple upstart script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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