Created
October 24, 2015 17:50
-
-
Save azenla/588d5391f35ecebc309e to your computer and use it in GitHub Desktop.
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/sh | |
### BEGIN INIT INFO | |
# Provides: DGBox | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: DGBox Service | |
# Description: DGBox Service | |
### END INIT INFO | |
# Some things that run always | |
# Store important stuff in root home. | |
export HOME="/root" | |
# Carry out specific functions when asked to by the system | |
case "$1" in | |
start) | |
echo "Starting DGBox Service..." | |
/root/dsa/dglux-server/bin/daemon.sh start | |
;; | |
stop) | |
echo "Stopping DGBox Service..." | |
/root/dsa/dglux-server/bin/daemon.sh stop | |
;; | |
restart) | |
echo "Restarting DGBox Service..." | |
/root/dsa/dglux-server/bin/daemon.sh restart | |
;; | |
log) | |
tail -200f /root/dsa/dglux-server/logs/dglux_server.log | |
;; | |
*) | |
echo "Usage: /etc/init.d/dgbox {start|stop|restart|log}" | |
exit 1 | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment