Mercurial > routeflapper
view routeflapper.rc.in @ 2:bb3f804f13a0
add random unsynchronization to hourly timer, trust prefix only for same origin AS, ignore self adjacency
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 19 May 2008 21:45:45 -0700 |
parents | 48d06780cf77 |
children |
line wrap: on
line source
#!@BASH@ # # routeflapper This script controls the routeflapper daemon. # # # chkconfig: 2345 60 40 # description: routeflapper monitors the bgp routes for new announcements # processname: routeflapper # pidfile: /var/run/routeflapper.pid # Source function library. # . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network RETVAL=0 # See how we were called. case "$1" in start) # Start daemons. echo -n "Starting routeflapper: " if [ ! -f /var/lock/subsys/routeflapper ]; then cd SYSCONFDIR # conf file is here SBINDIR/routeflapper -d 3 RETVAL=$? pid=`pidof -s SBINDIR/routeflapper` if [ $pid ] then success "Starting routeflapper :" touch /var/lock/subsys/routeflapper echo else failure "Starting routeflapper:" echo fi else echo -n "already running! " failure "routeflapper already running!" echo fi ;; stop) # Stop daemons. echo -n "Shutting down routeflapper: " killproc routeflapper RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/routeflapper ;; restart|reload) $0 stop $0 start RETVAL=$? ;; status) status routeflapper RETVAL=$? ;; *) echo "Usage: routeflapper {start|stop|restart|reload|status}" exit 1 esac exit $RETVAL