mirror of
https://github.com/webmin/webmin.git
synced 2025-07-29 11:50:54 +00:00
Add better logging
This commit is contained in:
@ -52,9 +52,18 @@ print "Updated password of Webmin user $user\n";
|
|||||||
|
|
||||||
# Send a signal to have miniserv reload it's config
|
# Send a signal to have miniserv reload it's config
|
||||||
if (open(PID, $config{'pidfile'})) {
|
if (open(PID, $config{'pidfile'})) {
|
||||||
<PID> =~ /(\d+)/; $pid = $1;
|
$pid = <PID>;
|
||||||
|
$pid =~ s/\r|\n//;
|
||||||
close(PID);
|
close(PID);
|
||||||
kill('USR1', $pid);
|
if (!$pid) {
|
||||||
|
print STDERR "Webmin is not running - cannot refresh configuration\n";
|
||||||
|
}
|
||||||
|
elsif (!kill('USR1', $pid)) {
|
||||||
|
print STDERR "Failed to signal process $pid - cannot refresh configuration\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
print STDERR "Webmin is not running - cannot refresh configuration\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub usage
|
sub usage
|
||||||
|
Reference in New Issue
Block a user