systemd_service/examples/redis.service
2024-06-13 05:36:19 +00:00

16 lines
544 B
Desktop File

[Unit]
Description=Redis Server
Documentation=https://redis.io
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=forking
ExecStart=/opt/redis/bin/redis-server /opt/redis/redis.conf
ExecReload=kill -9 $(ps aux | grep /opt/redis/bin/redis-server | grep -v grep | awk '{print $2}' | tr -d ' ') & /opt/redis/bin/redis-server /opt/redis/redis.conf
ExecStop=kill -9 $(ps aux | grep /opt/redis/bin/redis-server | grep -v grep | awk '{print $2}' | tr -d ' ')
Restart=always
[Install]
WantedBy=multi-user.target