Last active
August 20, 2016 04:15
-
-
Save haiderfaraz/3163e05a6c27e1ffebfbb099a5e4555e to your computer and use it in GitHub Desktop.
Bitnami Moodle init script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Moodle Startup Service script v1.0 by Faraz Haider 19 August 2016 | |
# acts as startup service script for Learning Management System. | |
# USAGE: start|stop|status | |
# | |
case "$1" in | |
start) | |
echo "Starting Moodle." | |
su -c '/opt/moodle/ctlscript.sh start' user_name | |
;; | |
stop) | |
echo "Stopping Moodle." | |
su -c '/opt/moodle/ctlscript.sh stop' user_name | |
;; | |
status) | |
# Check to see if the process is running | |
su -c '/opt/moodle/ctlscript.sh status' user_name | |
;; | |
*) | |
echo "Moodle Service." | |
echo $"Usage: $0 {start|stop|status}" | |
exit 1 | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment