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.

Revisions

  1. @gregology gregology revised this gist Aug 15, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions dashboard
    Original file line number Diff line number Diff line change
    @@ -49,8 +49,8 @@ ps aux|grep -i dashing
    ;;

    *)
    echo Dashing
    echo $Usage: $0 {start|stop|status|logs}
    echo "Dashing"
    echo $"Usage: $0 {start|stop|status|logs}"
    exit 1
    esac
    exit 0
  2. @gregology gregology revised this gist May 16, 2013. 1 changed file with 10 additions and 0 deletions.
    10 changes: 10 additions & 0 deletions dashboard
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,14 @@
    #!/bin/bash
    # Dashing service
    # Add this file to /etc/init.d/
    # $ sudo cp dashboard /etc/init.d/
    # Update variables DASHING_DIR, GEM_HOME, & PATH to suit your installation
    # $ sudo nano /etc/init.d/dashboard
    # Make executable
    # $ sudo chmod 755 /etc/init.d/dashboard
    # Update rc.d
    # $ sudo update-rc.d dashboard defaults
    # Dashboard will start at boot. Check out the boot log for trouble shooting "/var/log/boot.log"
    # USAGE: start|stop|status|logs

    ### BEGIN INIT INFO
    @@ -19,6 +27,8 @@
    # https://gist.github.com/haiderfaraz/2773431

    DASHING_DIR=/path/to/dashboard/
    GEM_HOME=/usr/local/lib/ruby/gems/1.9.1
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

    case "$1" in
    start)
  3. @gregology gregology revised this gist Apr 5, 2013. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions dashboard
    Original file line number Diff line number Diff line change
    @@ -13,6 +13,11 @@
    # Description: Enable service provided by daemon.
    ### END INIT INFO

    # Gregology <[email protected]>
    # https://gist.github.com/gregology/5313326
    # Based on Faraz Haider's LifeRay Startup Service script
    # https://gist.github.com/haiderfaraz/2773431

    DASHING_DIR=/path/to/dashboard/

    case "$1" in
  4. @gregology gregology revised this gist Apr 4, 2013. No changes.
  5. @gregology gregology revised this gist Apr 4, 2013. No changes.
  6. @gregology gregology revised this gist Apr 4, 2013. No changes.
  7. @gregology gregology revised this gist Apr 4, 2013. No changes.
  8. @gregology gregology revised this gist Apr 4, 2013. 1 changed file with 12 additions and 3 deletions.
    15 changes: 12 additions & 3 deletions dashboard
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,17 @@
    #!/bin/bash
    # Dashing service
    # Add this file to /etc/init.d/ and allow it to be executed
    # USAGE: $ service dashboard start|stop|status|logs
    #
    # Add this file to /etc/init.d/
    # USAGE: start|stop|status|logs

    ### BEGIN INIT INFO
    # Provides: dashboard
    # Required-Start: $remote_fs $syslog
    # Required-Stop: $remote_fs $syslog
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: Start daemon at boot time
    # Description: Enable service provided by daemon.
    ### END INIT INFO

    DASHING_DIR=/path/to/dashboard/

  9. @gregology gregology revised this gist Apr 4, 2013. No changes.
  10. @gregology gregology revised this gist Apr 4, 2013. No changes.
  11. @gregology gregology revised this gist Apr 4, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion dashboard
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/bash
    # Dashing service
    # Add this file to /etc/init.d/ and allow it to be executed
    # USAGE: start|stop|status|logs
    # USAGE: $ service dashboard start|stop|status|logs
    #

    DASHING_DIR=/path/to/dashboard/
  12. @gregology gregology created this gist Apr 4, 2013.
    32 changes: 32 additions & 0 deletions dashboard
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    #!/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