- 
      
- 
        Save mike-zhang/1a35b380bac510ad8795 to your computer and use it in GitHub Desktop. 
Revisions
- 
        sbisbee revised this gist Oct 28, 2011 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ #!/bin/bash # # chkconfig: 23 90 10 # Description: Quickly hacked together bigcouch init script for CentOS systems. . /etc/init.d/functions 
- 
        sbisbee revised this gist Oct 27, 2011 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,6 +8,8 @@ PID_FILE=/var/run/bigcouch.pid BIGCOUCH_BIN=/opt/bigcouch/bin/bigcouch SUBSYS_LOCK_FILE=/var/lock/subsys/bigcouch export HOME=/tmp start() { echo -n "Starting bigcouch: " 
- 
        sbisbee revised this gist Oct 27, 2011 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ #!/bin/bash # # chkconfig: 23 90 10 . /etc/init.d/functions 
- 
        sbisbee created this gist Oct 27, 2011 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,72 @@ #!/bin/bash . /etc/init.d/functions PID_FILE=/var/run/bigcouch.pid BIGCOUCH_BIN=/opt/bigcouch/bin/bigcouch SUBSYS_LOCK_FILE=/var/lock/subsys/bigcouch start() { echo -n "Starting bigcouch: " if [ -f "$PID_FILE" ]; then echo "already running: "`cat $PID_FILE` exit 2 fi $BIGCOUCH_BIN &>/dev/null & echo $! > $PID_FILE touch $SUBSYS_LOCK_FILE echo "OK" } stop() { echo -n "Shutting down bigcouch: " if [ ! -f "$PID_FILE" ]; then echo "already stopped" else kill -9 `cat $PID_FILE` rm -f $PID_FILE rm -f $SUBSYS_LOCK_FILE echo "OK" fi } status() { if [ -f "$PID_FILE" ]; then echo "Running with PID "`cat $PID_FILE` else echo "Not running" fi } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; status) status ;; *) echo "Usage: [start|stop|restart|status]" exit 1 ;; esac exit $?