mirror of
https://github.com/ziirish/burp-ui.git
synced 2026-05-22 14:15:41 -06:00
52 lines
917 B
Bash
Executable file
52 lines
917 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
trap appStop SIGINT SIGTERM
|
|
|
|
appStart () {
|
|
# start supervisord
|
|
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
|
|
|
echo "Starting crond..."
|
|
supervisorctl start cron >/dev/null
|
|
|
|
# watch the access logs
|
|
tail -F /var/log/dmesg
|
|
}
|
|
|
|
appStop() {
|
|
echo ""
|
|
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 gitlab 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
|