3
# keepalived LVS cluster monitor daemon.
5
# Written by Andres Salomon <dilinger@voxel.net>
9
# Required-Start: $syslog $network $remote_fs
10
# Required-Stop: $syslog $network $remote_fs
11
# Default-Start: 2 3 4 5
13
# Short-Description: Starts keepalived
14
# Description: Starts keepalived lvs loadbalancer
16
PATH=/sbin:/bin:/usr/sbin:/usr/bin
17
DAEMON=/usr/sbin/keepalived
20
CONFIG=/etc/keepalived/keepalived.conf
21
TMPFILES="/tmp/.vrrp /tmp/.healthcheckers"
23
#includes lsb functions
24
. /lib/lsb/init-functions
26
test -f $CONFIG || exit 0
27
test -f $DAEMON || exit 0
30
# Read configuration variable file if it is present
31
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
35
log_daemon_msg "Starting $DESC" "$NAME"
38
test -e $file && test ! -L $file && rm $file
40
if start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
41
--exec $DAEMON -- $DAEMON_ARGS; then
48
log_daemon_msg "Stopping $DESC" "$NAME"
49
if start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \
57
log_action_begin_msg "Reloading $DESC configuration..."
58
if start-stop-daemon --stop --quiet --signal 1 --pidfile \
59
/var/run/$NAME.pid --exec $DAEMON; then
66
log_action_begin_msg "Restarting $DESC" "$NAME"
68
start-stop-daemon --stop --quiet --pidfile \
69
/var/run/$NAME.pid --exec $DAEMON || true
71
if start-stop-daemon --start --quiet --pidfile \
72
/var/run/$NAME.pid --exec $DAEMON -- $DAEMON_ARGS; then
79
echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2