diff options
author | Johannes Truschnigg <johannes@truschnigg.info> | 2019-04-27 18:14:59 +0200 |
---|---|---|
committer | max ulidtko <ulidtko@gmail.com> | 2019-11-19 18:55:44 +0200 |
commit | 5bbc112fb183a4e9b38ebf86535a52784d5b03ff (patch) | |
tree | dc9bce32c86c20b6f87fa898c3fb243cdd57d8d2 /utils/systemd-redis_server.service | |
parent | 641c64ada10404356fc76c0b56a69b32c76f253c (diff) | |
download | redis-5bbc112fb183a4e9b38ebf86535a52784d5b03ff.tar.gz |
Provide example systemd service unit files for redis-server
Diffstat (limited to 'utils/systemd-redis_server.service')
-rw-r--r-- | utils/systemd-redis_server.service | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/utils/systemd-redis_server.service b/utils/systemd-redis_server.service new file mode 100644 index 000000000..addee3498 --- /dev/null +++ b/utils/systemd-redis_server.service @@ -0,0 +1,41 @@ +# example systemd service unit file for redis-server +# +# In order to use this as a template for providing a redis service in your +# environment, _at the very least_ make sure to adapt the redis configuration +# file you intend to use as needed (make sure to set "supervised systemd"), and +# to set sane TimeoutStartSec and TimeoutStopSec property values in the unit's +# "[Service]" section to fit your needs. +# +# Some properties, such as User= and Group=, are highly desirable for virtually +# all deployments of redis, but cannot be provided in a manner that fits all +# expectable environments. Some of these properties have been commented out in +# this example service unit file, but you are highly encouraged to set them to +# fit your needs. +# +# Please refer to systemd.unit(5), systemd.service(5), and systemd.exec(5) for +# more information. + +[Unit] +Description=Redis data structure server +Documentation=https://redis.io/documentation +#Before=your_application.service another_example_application.service +#AssertPathExists=/var/lib/redis + +[Service] +ExecStart=/usr/local/bin/redis-server --supervised systemd --daemonize no +## Alternatively, have redis-server load a configuration file: +#ExecStart=/usr/local/bin/redis-server /path/to/your/redis.conf +LimitNOFILE=10032 +NoNewPrivileges=yes +#OOMScoreAdjust=-900 +#PrivateTmp=yes +Type=notify +TimeoutStartSec=infinity +TimeoutStopSec=infinity +UMask=0077 +#User=redis +#Group=redis +#WorkingDirectory=/var/lib/redis + +[Install] +WantedBy=multi-user.target |