Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Chicago Boss init.d
#!/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
You can’t perform that action at this time.