mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
0782d45ca0
- 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>
51 lines
1 KiB
Bash
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
|