Skip to content

Instantly share code, notes, and snippets.

@lauris
Created April 5, 2016 11:01
Show Gist options
  • Save lauris/c3392f6690280a40276467929bab4231 to your computer and use it in GitHub Desktop.
Save lauris/c3392f6690280a40276467929bab4231 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Datazenit Auto-start
#
# Change /path/to/datazenit/ to the correct path where
# Datazenit is installed
case $1 in
start)
nohup /path/to/datazenit-1.0.0/bin/datazenit > /var/log/datazenit.log &
;;
stop)
kill $(cat /home/lauris/datazenit-1.0.0/RUNNING_PID)
;;
restart)
kill $(cat /home/lauris/datazenit-1.0.0/RUNNING_PID)
nohup /path/to/datazenit-1.0.0/bin/datazenit > /var/log/datazenit.log &
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment