#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc
##
##  rc.zebra -- Run-Commands for ZEBRA Daemon
##

%config
    zebra_enable="yes"

%start -p 200 -u root
    opServiceEnabled zebra || exit 0
    @l_prefix@/sbin/zebra -d
    @l_prefix@/sbin/ripd  -d
    @l_prefix@/sbin/ospfd -d
    @l_prefix@/sbin/bgpd  -d

%stop -p 200 -u root
    opServiceEnabled zebra || exit 0
    kill -TERM `cat @l_prefix@/var/zebra/bgpd.pid`
    kill -TERM `cat @l_prefix@/var/zebra/ospfd.pid`
    kill -TERM `cat @l_prefix@/var/zebra/ripd.pid`
    kill -TERM `cat @l_prefix@/var/zebra/zebra.pid`

