mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
60 lines
885 B
Text
60 lines
885 B
Text
|
#!/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
|