mirror of
https://github.com/ziirish/burp-ui.git
synced 2026-05-21 06:45:24 -06:00
64 lines
1.2 KiB
Bash
Executable file
64 lines
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
trap appStop SIGINT SIGTERM
|
|
|
|
appStart () {
|
|
# start supervisord
|
|
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
|
|
|
chown -R burpui: /tmp/bui
|
|
|
|
echo "Starting crond..."
|
|
supervisorctl start cron >/dev/null
|
|
|
|
echo "Starting burp..."
|
|
supervisorctl start burp >/dev/null
|
|
|
|
echo "Starting bui-agent..."
|
|
supervisorctl start buiagent >/dev/null
|
|
|
|
# watch the access logs
|
|
tail -F /var/log/supervisor/buiagent.log
|
|
}
|
|
|
|
appStop() {
|
|
echo ""
|
|
echo "Stopping bui-agent..."
|
|
supervisorctl stop bui-agent >/dev/null
|
|
echo "Stopping burp..."
|
|
supervisorctl stop burp >/dev/null
|
|
echo "Stopping crond..."
|
|
supervisorctl stop cron >/dev/null
|
|
echo "Stopping supervisord..."
|
|
kill -15 $(cat /var/run/supervisord.pid)
|
|
exit
|
|
}
|
|
|
|
appHelp () {
|
|
echo "Available options:"
|
|
echo " app:start - Starts the burp-ui server (default)"
|
|
echo " app:help - Displays the help"
|
|
echo " [command] - Execute the specified linux command eg. bash."
|
|
}
|
|
|
|
case "$1" in
|
|
app:start)
|
|
appStart
|
|
;;
|
|
*)
|
|
if [ -x $1 ]; then
|
|
$1
|
|
else
|
|
prog=$(which $1)
|
|
if [ -n "${prog}" ] ; then
|
|
shift 1
|
|
$prog $@
|
|
else
|
|
appHelp
|
|
fi
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
exit 0
|