-
-
Save cameronelliott/9895bb4d2036404479b4743c09e4ba4e to your computer and use it in GitHub Desktop.
Redis service for systemd on Linux
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
# Redis for Coturn systemd file | |
# | |
# Credit to the giants before me. | |
# | |
# apparently comments are allowed on recent versions of systemd, ala ubuntu 18.04+ | |
# | |
# the timeout and tcp-keepalive flags are per coturn recommendations, | |
# but really would seem to be most helpful in WAN/Internet scenarios | |
# see: https://github.com/coturn/coturn/blob/master/turndb/schema.stats.redis | |
# | |
[Unit] | |
Description=Redis persistent key-value storage | |
After=network.target | |
[Service] | |
Type=notify | |
ExecStart=/usr/bin/redis-server /etc/redis.conf --supervised systemd --daemonize no --timeout 0 --tcp-keepalive 60 | |
ExecStop=/usr/bin/redis-cli -p 6379 shutdown | |
ExecReload=/bin/kill -USR2 $MAINPID | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment