* added the Unlicense as valid in misc/share/REGISTER
[t2sde.git] / package / database / redis / redis-sentinel.init
blob5f7f044dd497c42d227ff9782221435ebb5c1bf4
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/redis/redis-sentinel.init
3 # Copyright (C) 2020 - 2022 The T2 SDE Project
4
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7
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
13 # Runlevel: 25 rcX
16 main_begin
18     block_begin(start, `Starting redis-sentinel')
19         check(`D_bindir/redis-sentinel /etc/redis/sentinel.conf --daemonize yes')
20     block_end
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)
25         else
26                 echo "redis is not running or /var/run/redis-sentinel.pid disappeared"
27                 error=1
28         fi')
29     block_end
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)
34         else
35                 echo "redis is not running or /var/run/redis-sentinel.pid disappeared."
36                 error=1
37         fi')
38     block_end
40 main_end