Skip to content

Instantly share code, notes, and snippets.

@zakjan
Last active November 19, 2015 14:30
Show Gist options
  • Save zakjan/4b52c62b1622cc5600c1 to your computer and use it in GitHub Desktop.
Save zakjan/4b52c62b1622cc5600c1 to your computer and use it in GitHub Desktop.
Dashing init script
#!/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