2011-11-01 00:25:50 +01:00
|
|
|
#!/bin/sh
|
|
|
|
# start, stop, restart and status of burp
|
|
|
|
|
|
|
|
RETVAL=0
|
|
|
|
|
2017-04-15 18:00:06 +02:00
|
|
|
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
|
2011-11-01 00:25:50 +01:00
|
|
|
}
|
|
|
|
|
2017-04-15 18:00:06 +02:00
|
|
|
stop()
|
|
|
|
{
|
|
|
|
echo "Stopping burp... "
|
|
|
|
killall burp 2>/dev/null
|
|
|
|
RETVAL=$?
|
|
|
|
rm -f /var/lock/subsys/burp
|
|
|
|
return $RETVAL
|
2011-11-01 00:25:50 +01:00
|
|
|
}
|
|
|
|
|
2017-04-15 18:00:06 +02:00
|
|
|
restart()
|
|
|
|
{
|
|
|
|
stop
|
|
|
|
sleep 1
|
|
|
|
start
|
2011-11-01 00:25:50 +01:00
|
|
|
}
|
|
|
|
|
2017-04-15 18:00:06 +02:00
|
|
|
status()
|
|
|
|
{
|
2011-11-01 00:25:50 +01:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
2017-04-15 18:00:06 +02:00
|
|
|
start)
|
|
|
|
start
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
stop
|
|
|
|
;;
|
|
|
|
restart)
|
|
|
|
restart
|
|
|
|
;;
|
|
|
|
status)
|
|
|
|
status
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo $"Usage: $0 {start|stop|restart|status}"
|
|
|
|
RETVAL=1
|
|
|
|
;;
|
2011-11-01 00:25:50 +01:00
|
|
|
esac
|
|
|
|
|
|
|
|
exit $RETVAL
|