| Server IP : 52.25.153.185 / Your IP : 216.73.217.131 Web Server : Apache System : Linux ip-172-26-6-158 5.10.0-35-cloud-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64 User : daemon ( 1) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /opt/bitnami/ |
Upload File : |
#!/bin/sh
#
# Copyright 2022 Bitnami.com All Rights Reserved
#
# ctlscript.sh interface for gonit
#
# Allow only root execution
if [ `id|sed -e s/uid=//g -e s/\(.*//g` -ne 0 ]; then
echo "This script requires root privileges"
exit 1
fi
help() {
echo "usage: $0 help"
echo " $0 (start|stop|restart|status)"
echo " $0 (start|stop|restart|status) [service]"
cat <<EOF
help - this screen
start - start the service(s)
stop - stop the service(s)
restart - restart or start the service(s)
status - show the status of the service(s)
EOF
}
get_status_from_gonit() {
gonit summary $1 | awk '
BEGIN { IGNORECASE=1 }
/Process/ {
printf $2 " "
if ( $NF == "Running" ) {
print "already running"
}
else {
print "not running"
}
}
'
}
if [ "x$1" = "help" ]; then
help
elif [ "x$2" = "x" ]; then
# Operation over all the services
if [ "x$1" = "xstart" ] || [ "x$1" = "xstop" ] || [ "x$1" = "xrestart" ]; then
echo "$1ing services.." | sed 's/^./\u&/g'
if [ -x /bin/systemctl ]; then
/bin/systemctl $1 bitnami
else
/etc/init.d/bitnami $1
fi
exit $?
elif [ "x$1" = "xstatus" ]; then
get_status_from_gonit
else
help
exit 1
fi
else
if [ "x$1" = "xstart" ] || [ "x$1" = "xstop" ] || [ "x$1" = "xrestart" ]; then
gonit $1 $2
exit $?
elif [ "x$1" = "xstatus" ]; then
get_status_from_gonit $2
else
help
exit 1
fi
fi