Search
j0ke.net Open Build Service
>
Projects
>
server:routing
>
python-exabgp
> exabgp-suse.init
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File exabgp-suse.init of Package python-exabgp (Revision 12)
Currently displaying revision
12
,
show latest
#!/bin/bash # ### BEGIN INIT INFO # Provides:exabgp # Required-Start: # Required-Stop: # Default-Start:3 5 # Default-Stop:0 1 2 6 # Short-Description:Start exabgp # Description:The BGP swiss army knife of networking ### END INIT INFO config="/etc/exabgp/exabgp.conf" exabgp="/usr/sbin/exabgp" prog="exabgp" . /etc/rc.status [ -f /etc/sysconfig/exabgp ] && . /etc/sysconfig/exabgp rc_reset case "$1" in start) if [ -n "${ENVDIR}" ] ; then PIDDIR=`grep ^pid /usr/share/exabgp/etc/exabgp.env | awk '{print "dirname " $NF}'|sh` USER=`grep ^user /usr/share/exabgp/etc/exabgp.env | awk '{print $NF}'|sed -e s@[\'\"]@@g` mkdir -p ${PIDDIR} chown -R ${USER} ${PIDDIR} fi echo -n "Starting $prog: " $exabgp $config ${OPTIONS} rc_status -v ;; stop) echo -n "Shutting down $prog: " /bin/kill -9 `/sbin/pidof exabgp` until [ -z $(/sbin/pidof exabgp) ]; do :; done rc_status -v ;; reload) /bin/kill -USR1 `/sbin/pidof exabgp` rc_status -v ;; restart) $0 stop $0 start rc_status ;; status) echo -n "$prog status:" rc_status -v ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac rc_exit