slackbuilds_ponce/network/keepalived/rc.keepalived
Marek Wodzinski 0782d45ca0 network/keepalived: Updated for version 2.0.20.
- update to newest version
- disabled nftables support as it doesn't compile on 14.2
- removed dependency of optional sysvinit-functions and simplified rc.keepalived
- moved daemon configuration to /etc/default

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2020-04-24 08:16:35 +07:00

51 lines
1 KiB
Bash

#!/bin/sh
#
# Startup script for the Keepalived daemon
#
# This is the modified version from the original for the
# Slackware.
#
# This version was modified in 2010 by Nilton Moura,
# the original author of the SlackBuild Script for keepalived.
#
# Sript simplified, removed dependency of optional sysvinit-functions
# package and moved daemon options to /etc/default
# in 2020 by Marek Wodzinski <majek@w7i.pl>
# Source configuration file (we set KEEPALIVED_OPTIONS there)
. /etc/default/keepalived
start() {
echo "Starting keepalived"
/usr/sbin/keepalived ${KEEPALIVED_OPTIONS}
}
stop() {
echo "Stopping keepalived "
pkill -TERM keepalived 1>/dev/null 2>/dev/null
}
reload() {
echo "Reloading keepalived"
pkill -1 keepalived
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
reload
;;
restart)
stop
start
;;
*)
echo "Usage: $0 {start|stop|reload|restart}"
exit 1
esac