Skip to content

Instantly share code, notes, and snippets.

@natewalck
Forked from gregology/dashboard
Created May 5, 2014 16:20
Show Gist options
  • Select an option

  • Save natewalck/5cd0ef341c655e9958c3 to your computer and use it in GitHub Desktop.

Select an option

Save natewalck/5cd0ef341c655e9958c3 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Dashing service
# Add this file to /etc/init.d/ and allow it to be executed
# USAGE: start|stop|status|logs
#
DASHING_DIR=/path/to/dashboard/
case "$1" in
start)
echo "Starting Dashing."
cd $DASHING_DIR; dashing start -d
;;
stop)
echo "Stopping Dashing."
killall thin
;;
logs)
echo "See the logs of the Dashing."
tail -f $DASHING_DIR'log/thin.log'
;;
status)
# Check to see if the process is running
ps aux|grep -i dashing
;;
*)
echo “Dashing”
echo $”Usage: $0 {start|stop|status|logs}”
exit 1
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment