Look in multiple locations for PID file on Debian/Ubuntu http://virtualmin.com/node/26817

This commit is contained in:
Jamie Cameron
2013-08-28 08:44:33 -07:00
parent 327b8136f3
commit f4bdcdecf6
2 changed files with 6 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
config_file=iSCSI target configuration file,0
ietadm=Full path to ietadm command,0
pid_file=Full path to PID file,0
pid_file=Full path to PID file(s),0
init_name=Bootup script name,0
opts_file=File containing command line flags,0
initiators_file=File listing allowed initiator addresses,0

View File

@@ -218,7 +218,11 @@ return wantarray ? @rv : $rv[0];
# Returns the PID if the server process is running, or 0 if not
sub is_iscsi_target_running
{
return &check_pid_file($config{'pid_file'});
foreach my $pidfile (split(/\s+/, $config{'pid_file'})) {
my $pid = &check_pid_file($pidfile);
return $pid if ($pid);
}
return undef;
}
# find_host_name(&config)