2024-05-10 15:32:00 +00:00
|
|
|
[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
|
2024-06-13 13:36:00 +00:00
|
|
|
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 ' ')
|
2024-05-10 15:32:00 +00:00
|
|
|
Restart=always
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|