#!/bin/sh # # gated Routing Protocol Daemon # # chkconfig: 345 19 85 # description: Start and stop gated # # processname: gated # config: /etc/ha.d/conf/ldirectord.cf # # Author: Horms # Released: May 2000 # Licence: GNU General Public Licence # # Make sure there is a configuration [ -f /etc/gated.conf ] || exit 1 # If there is a sysconf/gated then read it # If the environment variable GATED_COMMAND_LINE_OPTIONS is # defined in this file then it will be passed to gated when it is run. [ -f /etc/sysconfig/gated ] && . /etc/sysconfig/gated # Source function library. . /etc/rc.d/init.d/functions ###################################################################### # Read argument and take action as appropriate ###################################################################### case "$1" in start) action "Starting gated" /usr/sbin/gated $GATED_COMMAND_LINE_OPTIONS ;; stop) echo -n "Stopping gated:" killproc gated echo ;; restart) echo -n "Restarting gated:" if [ -f /var/run/gated.pid ] && kill -HUP $(cat /var/run/gated.pid) then echo -n " HUP signal sent" echo_success echo else echo $0 stop $0 start fi ;; status) status gated ;; *) echo "Usage: ipv4_conf {start|stop|restart|status}" exit 1 esac exit 0