Skip to content

Instantly share code, notes, and snippets.

@ninegene
Created March 3, 2013 06:07
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 ninegene/5074854 to your computer and use it in GitHub Desktop.
Save ninegene/5074854 to your computer and use it in GitHub Desktop.
# Ubuntu upstart file at /etc/init/redis-server.conf
description "redis server"
pre-start script
mkdir -p /var/lib/redis/
mkdir -p /var/log/redis/
chown -R redis /var/lib/redis/
chown -R redis /var/log/redis/
end script
start on runlevel [2345]
stop on runlevel [06]
exec sudo -u redis /usr/local/bin/redis-server /etc/redis/redis.conf
respawn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment