diff options
author | Chris Abela <kristofru@gmail.com> | 2011-10-31 18:25:50 -0500 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-11-04 22:02:25 -0200 |
commit | b843c43a2f9a3e9dabdbbc00fb91c945dcaeb335 (patch) | |
tree | 0545f7ed7bef74f0088955226bb30803ff272829 /system/burp/rc.burp | |
parent | c6c1945a5ea18be6c9d3239933976a807d44bead (diff) | |
download | slackbuilds-b843c43a2f9a3e9dabdbbc00fb91c945dcaeb335.tar.gz |
system/burp: Added (backup and restore program)
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'system/burp/rc.burp')
-rw-r--r-- | system/burp/rc.burp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/system/burp/rc.burp b/system/burp/rc.burp new file mode 100644 index 0000000000..9f4b117e6f --- /dev/null +++ b/system/burp/rc.burp @@ -0,0 +1,59 @@ +#!/bin/sh +# start, stop, restart and status of burp + +RETVAL=0 + +start(){ + echo "Starting burp: /usr/sbin/burp -c /etc/burp/burp-server.conf" + /usr/sbin/burp -c /etc/burp/burp-server.conf + RETVAL=$? + [ "$RETVAL" = 0 ] && touch /var/lock/subsys/burp + return $RETVAL +} + +stop(){ + echo "Stopping burp... " + killall burp 2>/dev/null + RETVAL=$? + rm -f /var/lock/subsys/burp + return $RETVAL +} + +restart(){ + stop + sleep 1 + start +} + +status(){ + echo -n $"Checking burp: " + /bin/kill -s IOT burp 2>/dev/null + RETVAL=$? + if [ $RETVAL = 0 ]; then + echo "burp is running" + else + echo "burp is not running" + fi + return $RETVAL +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + status) + status + ;; + *) + echo $"Usage: $0 {start|stop|restart|status}" + RETVAL=1 +esac + +exit $RETVAL |