更新redis.service

This commit is contained in:
huty 2024-06-13 13:36:00 +00:00 committed by cloud-init created default user
parent a229064947
commit 1ffa3da357

View File

@ -7,8 +7,8 @@ Wants=network-online.target
[Service]
Type=forking
ExecStart=/opt/redis/bin/redis-server /opt/redis/redis.conf
ExecReload=/opt/redis/bin/redis-server -s reload
ExecStop=/opt/redis/bin/redis-server -s stop
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]