Created
August 28, 2014 06:22
-
-
Save manuelpichler/bec5a620863a472cc8f6 to your computer and use it in GitHub Desktop.
Simple start/stop script for ZoneMinder
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 | |
progName="ZoneMinder environment" | |
start() { | |
echo "Starting ${progName}" | |
sudo /etc/init.d/zoneminder start | |
sudo /etc/init.d/apache2 start | |
} | |
stop() { | |
echo "Stopping ${progName}" | |
sudo /etc/init.d/zoneminder stop | |
sudo /etc/init.d/apache2 stop | |
} | |
status() { | |
echo "Status of ${progName}" | |
sudo /etc/init.d/zoneminder status | |
sudo /etc/init.d/apache2 status | |
} | |
case "$1" in | |
start) | |
start | |
;; | |
stop) | |
stop | |
;; | |
restart) | |
stop | |
start | |
;; | |
status) | |
status | |
;; | |
*) | |
echo $"Usage: $0 {start|stop|restart|status}" | |
exit 1 | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment