Created
October 12, 2012 14:19
-
-
Save imperialwicket/3879410 to your computer and use it in GitHub Desktop.
Chicago Boss init.d
This file contains 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 characters
#!/bin/bash | |
# | |
# /etc/rc.d/init.d/chicagoboss | |
# | |
# Starts Chicago Boss from the /home/boss/cb_admin directory. | |
# | |
# Source function library. | |
. /etc/rc.d/init.d/functions | |
chicagoboss="/home/boss/ChicagoBoss" | |
cb_admin="/home/boss/cb_admin" | |
lockfile="/var/lock/subsys/chicagoboss" | |
pidfile="/var/run/chicagoboss.pid" | |
prog="chicagoboss" | |
start(){ | |
echo -n "Starting Chicago Boss services: " | |
su - boss -c $cb_admin'/init.sh start' | |
} | |
stop(){ | |
echo -n "Shutting down Chicago Boss services: " | |
su - boss -c $cb_admin'/init.sh stop' | |
} | |
restart(){ | |
echo -n "Restarting Chicago Boss services: " | |
su - boss -c $cb_admin'/init.sh restart' | |
} | |
reload(){ | |
echo -n "Reloading Chicago Boss services: " | |
su - boss -c $cb_admin'/init.sh reload' | |
} | |
case "$1" in | |
start|stop|reload|restart) | |
$1 | |
;; | |
init-dev) | |
echo "Use '/home/boss/cb_admin/init-dev.sh' or | |
'/home/boss/cb_admin/rebar boss c=start_dev_cmd' for dev start." | |
;; | |
*) | |
echo "Usage: <servicename> {start|stop|reload|restart}" | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment