burp-ui/docker/docker-cli2/assets/init
2015-12-06 17:41:46 +01:00

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