Skip to content

Commit

Permalink
rework system init scripts (and whatever OSX uses) for starman.
Browse files Browse the repository at this point in the history
  • Loading branch information
perlDreamer committed Dec 15, 2011
1 parent 34519fc commit a6763d0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
22 changes: 11 additions & 11 deletions wre/sbin/services/freebsd/webgui
Expand Up @@ -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}"
Expand All @@ -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"
Expand All @@ -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() {
Expand Down
14 changes: 7 additions & 7 deletions wre/sbin/services/redhat/webgui
Expand Up @@ -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
Expand All @@ -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 }"
Expand Down
20 changes: 10 additions & 10 deletions wre/sbin/services/redhat/wre-apache
@@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit a6763d0

Please sign in to comment.