Skip to content
Snippets Groups Projects
Commit dea8cfad authored by Mark Harrison's avatar Mark Harrison
Browse files

Adding reload support to the resmon init script, and changed the web server...

Adding reload support to the resmon init script, and changed the web server child process to ignore the HUP signal so killproc -HUP (and killall -HUP) will work correctly.

git-svn-id: https://labs.omniti.com/resmon/trunk@117 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55
parent 09d0def7
No related branches found
No related tags found
No related merge requests found
...@@ -307,6 +307,7 @@ sub serve_http_on { ...@@ -307,6 +307,7 @@ sub serve_http_on {
$self->{child} = fork(); $self->{child} = fork();
if($self->{child} == 0) { if($self->{child} == 0) {
eval { eval {
$SIG{'HUP'} = 'IGNORE';
while(my $client = $handle->accept) { while(my $client = $handle->accept) {
my $req; my $req;
my $proto; my $proto;
......
...@@ -43,6 +43,12 @@ restart() { ...@@ -43,6 +43,12 @@ restart() {
stop stop
start start
} }
reload() {
echo -n $"Reloading resmon: "
killproc resmon -HUP
echo
return $?
}
case "$1" in case "$1" in
start) start)
...@@ -54,9 +60,12 @@ case "$1" in ...@@ -54,9 +60,12 @@ case "$1" in
status) status)
rhstatus rhstatus
;; ;;
restart|reload) restart)
restart restart
;; ;;
reload)
reload
;;
condrestart) condrestart)
[ -f /var/lock/subsys/resmon ] && restart || : [ -f /var/lock/subsys/resmon ] && restart || :
;; ;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment