# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/redis/redis-sentinel.init # Copyright (C) 2020 - 2022 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- # # Desc: secure shell daemon # Runlevel: 25 rcX # main_begin block_begin(start, `Starting redis-sentinel') check(`D_bindir/redis-sentinel /etc/redis/sentinel.conf --daemonize yes') block_end block_begin(stop, `Stopping redis-sentinel') check(`if [ -s /var/run/redis-sentinel.pid ]; then kill $(cat /var/run/redis-sentinel.pid) else echo "redis is not running or /var/run/redis-sentinel.pid disappeared" error=1 fi') block_end block_begin(restart, `Restarting redis-sentinel') check(`if [ -s /var/run/redis-sentinel.pid ]; then kill -HUP $(cat /var/run/redis-sentinel.pid) else echo "redis is not running or /var/run/redis-sentinel.pid disappeared." error=1 fi') block_end main_end