Skip to content

Instantly share code, notes, and snippets.

@documentcloud
Created September 23, 2009 14:06
Show Gist options
  • Save documentcloud/192027 to your computer and use it in GitHub Desktop.
Save documentcloud/192027 to your computer and use it in GitHub Desktop.
#! /bin/sh
### BEGIN INIT INFO
# Provides: cloud-crowd
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: starts a cloud-crowd node
# Description: starts a cloud-crowd node using start-stop-daemon
### END INIT INFO
PATH=/usr/local/bin:/usr/bin:$PATH
DAEMON=crowd
CONFIG_PATH=</path/to/your/config/folder>
test -x $DAEMON || exit 0
case "$1" in
start)
$DAEMON -d -c $CONFIG_PATH node start
;;
stop)
$DAEMON -d -c $CONFIG_PATH node stop
;;
restart)
$DAEMON -d -c $CONFIG_PATH node restart
;;
*)
echo "Usage: $DAEMON -d node [start|stop|restart]" >&2
exit 3
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment