summaryrefslogblamecommitdiffstats
path: root/cluster/keepalived/init.d/keepalived
blob: dbd9ba49114dddcf9d1003d66c94e92904e02b18 (plain) (tree)







































                                      
#!/bin/bash


RUNLEVEL=3
PID_FILE="/var/run/keepalived.pid"
PROGRAM="/usr/sbin/keepalived"


. /etc/init.d/smgl_init
. /etc/sysconfig/init


start ()
{
    echo "Starting Keepalived"
    keepalived -D
    touch /var/lock/subsys/keepalived
    evaluate_retval
}

stop ()
{
    echo "Shutting down Keepalived"
    PID=`cat $PID_FILE`
    kill $PID
    rm -rf /var/lock/subsys/keepalived
    evaluate_retval
}

restart()
{
    run_func stop
    sleep 1
    run_func start
}

reload()
{
    run_func restart
}