You can do this with start-stop-daemon, here are two examples:
SQLCONF=/etc/kannel/sqlbox.conf
DEBULVLV=3
BOXPATH=/usr/sbin
PIDFILES=/var/run/kannel
#Start
start-stop-daemon --start --quiet \
--pidfile $PIDFILES/kannel_sqlbox.pid \
--chuid kannel \
--exec $BOXPATH/run_kannel_box \
-- \
--pidfile $PIDFILES/kannel_sqlbox.pid \
--no-extra-args \
$BOXPATH/sqlbox -v $DEBUGLVL -- $SQLCONF
#Stop
start-stop-daemon --stop --retry 5 --quiet \
--pidfile $PIDFILES/kannel_sqlbox.pid \
--exec $BOXPATH/run_kannel_box
or you can use simple killall method.
2012/7/30 Ravindra Gupta // Viva <[email protected]>
> Dear Team,
>
> How to restart sequence wise sqlbox service.
>