Last active
November 19, 2015 14:30
-
-
Save zakjan/4b52c62b1622cc5600c1 to your computer and use it in GitHub Desktop.
Dashing 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/sh | |
### BEGIN INIT INFO | |
# Provides: dashing | |
# Required-Start: $network | |
# Required-Stop: $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
### END INIT INFO | |
USER=dashing | |
DIR=/opt/dashing | |
DASHING=/usr/local/bin/dashing | |
case $1 in | |
start) | |
start-stop-daemon --start -c $USER -d $DIR --exec $DASHING -- start -d ;; | |
stop) | |
start-stop-daemon --start -c $USER -d $DIR --exec $DASHING stop ;; | |
*) | |
echo "Usage: $0 {start|stop}" | |
exit 1 | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment