Skip to content
Permalink
Browse files

rework system init scripts (and whatever OSX uses) for starman.

  • Loading branch information...
perlDreamer committed Dec 15, 2011
1 parent 34519fc commit a6763d0f5e1cb78c6028ba9c6c76ff44a1c68a32
Showing with 28 additions and 28 deletions.
  1. +11 −11 wre/sbin/services/freebsd/webgui
  2. +7 −7 wre/sbin/services/redhat/webgui
  3. +10 −10 wre/sbin/services/redhat/wre-apache
@@ -8,23 +8,23 @@ name="webgui"
rcvar=`set_rcvar`

extra_commands="help startweb stopweb restartweb\
startmodperl stopmodperl restartmodperl\
startstarman stopstarman restartstarman\
startnginx stopnginx restartnginx\
startmysql stopmysql restartmysql\
startspectre stopspectre restartspectre\
"
help_cmd="${name}_help"
start_cmd="${name}_start"
stop_cmd="${name}_stop"
startweb_cmd="${startmodperl_cmd}; ${startnginx_cmd}"
stopweb_cmd="${stopnginx_cmd}; ${stopmodperl_cmd}"
startweb_cmd="${startstarman_cmd}; ${startnginx_cmd}"
stopweb_cmd="${stopnginx_cmd}; ${stopstarman_cmd}"
restartweb_cmd="${stopweb_cmd}; ${startweb_cmd}"
startnginx_cmd="${name}_startnginx"
stopnginx_cmd="${name}_stopnginx"
restartnginx_cmd="${stopnginx_cmd}; ${startnginx_cmd}"
startmodperl_cmd="${name}_startmodperl"
stopmodperl_cmd="${name}_stopmodperl"
restartmodperl_cmd="${stopmodperl_cmd}; ${startmodperl_cmd}"
startstarman_cmd="${name}_startstarman"
stopstarman_cmd="${name}_stopstarman"
restartstarman_cmd="${stopstarman_cmd}; ${startstarman_cmd}"
startmysql_cmd="${name}_startmysql"
stopmysql_cmd="${name}_stopmysql"
restartmysql_cmd="${stopmysql_cmd}; ${startmysql_cmd}"
@@ -41,7 +41,7 @@ webgui_help() {
echo " -- Start/stop all WRE services"
echo " $0 { startweb | stopweb | restartweb }"
echo " -- Start/stop both Apache services"
echo " $0 { startmodperl | stopmodperl | restartmodperl }"
echo " $0 { startstarman | stopstarman | restartstarman }"
echo " -- Start/stop mod_perl (WebGUI) Apache service"
echo " $0 { startnginx | stopnginx | restartnginx }"
echo " -- Start/stop mod_proxy Apache service"
@@ -60,12 +60,12 @@ webgui_stop() {
wreservice.pl --quiet --stop all
}

webgui_startmodperl() {
wreservice.pl --quiet --start modperl
webgui_startstarman() {
wreservice.pl --quiet --start starman
}

webgui_stopmodperl() {
wreservice.pl --quiet --stop modperl
webgui_stopstarman() {
wreservice.pl --quiet --stop starman
}

webgui_startnginx() {
@@ -34,14 +34,14 @@ case "$1" in
restartweb)
/data/wre/sbin/wreservice.pl --quiet --restart web
;;
startmodperl)
/data/wre/sbin/wreservice.pl --quiet --start modperl
startstarman)
/data/wre/sbin/wreservice.pl --quiet --start starman
;;
stopmodperl)
/data/wre/sbin/wreservice.pl --quiet --stop modperl
stopstarman)
/data/wre/sbin/wreservice.pl --quiet --stop starman
;;
restartmodperl)
/data/wre/sbin/wreservice.pl --quiet --restart modperl
restartstarman)
/data/wre/sbin/wreservice.pl --quiet --restart starman
;;
startnginx)
/data/wre/sbin/wreservice.pl --quiet --start nginx
@@ -66,7 +66,7 @@ case "$1" in
echo $"Usage:"
echo $" $0 { start | stop | restart }"
echo $" $0 { startweb | stopweb | restartweb }"
echo $" $0 { startmodperl | stopmodperl | restartmodperl }"
echo $" $0 { startstarman | stopstarman | restartstarman }"
echo $" $0 { startnginx | stopnginx | restartnginx }"
echo $" $0 { startmysql | stopmysql | restartmysql }"
echo $" $0 { startspectre | stopspectre | restartspectre }"
@@ -1,7 +1,7 @@
#!/bin/bash
# chkconfig: 2345 90 60
# description: Start and stop WebGUI (WRE) Apache
# processname: wreapache
# description: Start and stop WebGUI (WRE) Web services (starman and nginx)
# processname: wreweb

. /data/wre/sbin/setenvironment.sh

@@ -16,14 +16,14 @@ case "$1" in
restart)
/data/wre/sbin/wreservice.pl --quiet --restart web
;;
startmodperl)
/data/wre/sbin/wreservice.pl --quiet --start modperl
startstarman)
/data/wre/sbin/wreservice.pl --quiet --start starman
;;
stopmodperl)
/data/wre/sbin/wreservice.pl --quiet --stop modperl
stopstarman)
/data/wre/sbin/wreservice.pl --quiet --stop starman
;;
restartmodperl)
/data/wre/sbin/wreservice.pl --quiet --restart modperl
restartstarman)
/data/wre/sbin/wreservice.pl --quiet --restart starman
;;
startnginx)
/data/wre/sbin/wreservice.pl --quiet --start nginx
@@ -35,10 +35,10 @@ case "$1" in
/data/wre/sbin/wreservice.pl --quiet --restart nginx
;;
*)
echo $"WRE Apache Service Controller"
echo $"WRE Web Service Controller"
echo $"Usage:"
echo $" $0 { start | stop | restart }"
echo $" $0 { startmodperl | stopmodperl | restartmodperl }"
echo $" $0 { startstarman | stopstarman | restartstarman }"
echo $" $0 { startnginx | stopnginx | restartnginx }"
echo $" $0 { startweb | stopweb | restartweb }"
exit 1

0 comments on commit a6763d0

Please sign in to comment.
You can’t perform that action at this time.