Skip to content

Instantly share code, notes, and snippets.

@manuelpichler
Created August 28, 2014 06:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manuelpichler/bec5a620863a472cc8f6 to your computer and use it in GitHub Desktop.
Save manuelpichler/bec5a620863a472cc8f6 to your computer and use it in GitHub Desktop.
Simple start/stop script for ZoneMinder
#!/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