Page MenuHomeDevCentral

init
No OneTemporary

#!/bin/bash
set -e
# generate a password for root.
ROOT_PASSWORD=$(pwgen -c -n -1 12)
echo "root:$ROOT_PASSWORD" | chpasswd
echo User: root Password: $ROOT_PASSWORD
# start supervisord
/usr/bin/supervisord
supervisorctl start sshd
appStart () {
echo "Starting openfire..."
supervisorctl start openfire >/dev/null
tail -F /usr/share/openfire/logs/info.log
}
appHelp () {
echo "Available options:"
echo " app:start - Start the openfire server (default)"
echo " app:help - Displays the help"
echo " [command] - Execute the specified linux command eg. bash."
}
case "$1" in
app:start)
appStart
;;
app:help)
appHelp
;;
*)
if [ -x $1 ]; then
$1
else
prog=$(which $1)
if [ -n "${prog}" ] ; then
shift 1
$prog $@
else
appHelp
fi
fi
;;
esac
exit 0

File Metadata

Mime Type
text/x-shellscript
Expires
Sat, Nov 7, 22:43 (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4243319
Default Alt Text
init (826 B)

Event Timeline