geschke/redis-server.service
Created
Ubuntu systemd service file for Redis. The server was updated to a Ubuntu 15.04 (Vivid Vervet) distribution. Redis was installed from the PPA from Roman Wookey (https://launchpad.net/~rwky/+archive/ubuntu/redis). After the switch to systemd instead of Upstart, Redis was not started by default. So I've hacked the following systemd config file. It…
| [Unit] | |
| Description=Redis Datastore Server | |
| After=network.target | |
| [Service] | |
| Type=forking | |
| PIDFile=/var/run/redis/redis.pid | |
| ExecStartPre=/bin/mkdir -p /var/run/redis | |
| ExecStartPre=/bin/chown redis:redis /var/run/redis | |
| ExecStart=/sbin/start-stop-daemon --start --chuid redis:redis --pidfile /var/run/redis/redis.pid --umask 007 --exec /usr/bin/redis-server -- /etc/redis/redis.conf | |
| ExecReload=/bin/kill -USR2 $MAINPID | |
| [Install] | |
| WantedBy=multi-user.target |
daurnimator
commented
augustf
commented
At least on Debian, /lib/systemd/system is the proper location. As always, mileage varies across distributions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please don't suggest placing files in /lib. Place in
/etc/systemd/systemd instead