New package: keepalived
[people/teissler/ipfire-2.x.git] / src / initscripts / init.d / keepalived
1 #!/bin/sh
2 ########################################################################
3 # Begin $rc_base/init.d/keepalived
4 #
5 # Description : keepalive daemon initscript
6 #
7 ########################################################################
8
9 . /etc/sysconfig/rc
10 . ${rc_functions}
11
12 [ -r "/etc/sysconfig/keepalive" ] && . /etc/sysconfig/keepalive
13
14 case "${1}" in
15 start)
16 boot_mesg "Starting keepalive daemon..."
17 loadproc /usr/sbin/keepalived ${KEEPALIVED_OPTIONS}
18 ;;
19
20 stop)
21 boot_mesg "Stopping keepalive daemon..."
22 killproc /usr/sbin/keepalived
23 ;;
24
25 reload)
26 boot_mesg "Reloading keepalive daemon..."
27 reloadproc /etc/sbin/keepalived
28 ;;
29
30 restart)
31 ${0} stop
32 sleep 1
33 ${0} start
34 ;;
35
36 status)
37 statusproc /usr/sbin/keepalived
38 ;;
39
40 *)
41 echo "Usage: ${0} {start|stop|reload|restart|status}"
42 exit 1
43 ;;
44 esac
45
46 # End $rc_base/init.d/keepalived