Last active
December 10, 2015 19:08
-
-
Save ltvolks/4479163 to your computer and use it in GitHub Desktop.
Redis upstart script (slightly modified from PPA: https://launchpad.net/~rwky/+archive/redis)
This file contains hidden or 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
| # redis-server - Redis Datastore Server | |
| # | |
| # Redis is a key value in memory persistent datastore | |
| # . Assumes certain config options: | |
| # | |
| # * bind 127.0.0.1 | |
| # * daemonize yes | |
| # * pid, data, log, and config directories are expected to live in: /var/run/redis/redis.pid, /var/lib/redis/ , /var/log/redis/, /etc/redis/redis.conf | |
| description "Redis server" | |
| start on (local-filesystems and net-device-up IFACE=lo and runlevel [2345]) | |
| stop on runlevel [016] | |
| respawn | |
| expect fork | |
| limit nofile 20000 65000 | |
| pre-start script | |
| mkdir -p /var/{run/redis,lib/redis,log/redis} | |
| chown redis:redis /var/{run/redis,lib/redis,log/redis} | |
| end script | |
| exec start-stop-daemon --start --chuid redis:redis --pidfile /var/run/redis/redis.pid --umask 007 --exec /usr/local/bin/redis-server -- /etc/redis/redis.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment