1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/redis/redis-sentinel.init
3 # Copyright (C) 2020 - 2022 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 # Desc: secure shell daemon
18 block_begin(start, `Starting redis-sentinel')
19 check(`D_bindir/redis-sentinel /etc/redis/sentinel.conf --daemonize yes')
22 block_begin(stop, `Stopping redis-sentinel')
23 check(`if [ -s /var/run/redis-sentinel.pid ]; then
24 kill $(cat /var/run/redis-sentinel.pid)
26 echo "redis is not running or /var/run/redis-sentinel.pid disappeared"
31 block_begin(restart, `Restarting redis-sentinel')
32 check(`if [ -s /var/run/redis-sentinel.pid ]; then
33 kill -HUP $(cat /var/run/redis-sentinel.pid)
35 echo "redis is not running or /var/run/redis-sentinel.pid disappeared."