Skip to content

Instantly share code, notes, and snippets.

@sumskyi
Created June 4, 2010 12:44
Show Gist options
  • Save sumskyi/425367 to your computer and use it in GitHub Desktop.
Save sumskyi/425367 to your computer and use it in GitHub Desktop.
clarity.sh
#!/bin/sh
# ubuntu start/stop
BIN="/usr/bin/clarity"
test -x $BIN || exit 0
CMD="$BIN -- --username=admin --password=secret --port=8989 /var/www/weblogs/ "
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting service" "clarity"
start-stop-daemon --start --make-pidfile --pidfile /var/run/weblog.pid --background --startas $CMD
log_end_msg $?
;;
stop)
log_daemon_msg "Shutting down service" "clarity"
start-stop-daemon --stop --pidfile /var/run/weblog.pid
log_end_msg $?
rm -f /var/run/weblog.pid
;;
*)
log_action_msg "Usage: /etc/init.d/weblog {start|stop}"
exit 2
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment