projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8b7052
)
Handle missing xinetd PID file
author
Jamie Cameron
<jcameron@webmin.com>
Mon, 23 Mar 2009 18:12:17 +0000
(18:12 +0000)
committer
Jamie Cameron
<jcameron@webmin.com>
Mon, 23 Mar 2009 18:12:17 +0000
(18:12 +0000)
status/xinetd-monitor.pl
patch
|
blob
|
history
diff --git
a/status/xinetd-monitor.pl
b/status/xinetd-monitor.pl
index
2b43a99
..
9f033c1
100644
(file)
--- a/
status/xinetd-monitor.pl
+++ b/
status/xinetd-monitor.pl
@@
-5,11
+5,12
@@
sub get_xinetd_status
{
local %xconfig = &foreign_config($_[1]);
return { 'up' => -1 } if (!-r $xconfig{'xinetd_conf'});
-if (open(PID, $xconfig{'pid_file'}) && <PID> =~ /(\d+)/ && kill(0, $1)) {
- close(PID);
+&foreign_require($_[1], "xinetd-lib.pl");
+if (&xinetd::is_xinetd_running()) {
local @st = stat($xconfig{'pid_file'});
return { 'up' => 1,
- 'desc' => &text('up_since', scalar(localtime($st[9]))) };
+ 'desc' => @st ? &text('up_since', scalar(localtime($st[9])))
+ : undef };
}
return { 'up' => 0 };
}