1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| [Unit]
Description = redis After = network.target syslog.target Wants = network.target
[Service] Type = simple WorkingDirectory = /opt/Redis-6.2.1 Restart = always
ExecStart = /opt/Redis-6.2.1/redis-server /root/RedisData/redis-conf.conf
ExecStop = kill -9 $(pidof redis-server)
ExecReload = kill -9 $(pidof redis-server) && /opt/Redis-6.2.1/redis-server /root/RedisData/redis-conf.conf
[Install] WantedBy = multi-user.target
|