summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a605e8a)
raw | patch | inline | side by side (parent: a605e8a)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 8 Apr 2008 06:20:14 +0000 (06:20 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 8 Apr 2008 06:20:14 +0000 (06:20 +0000) |
Correct SigInt-Handler (killall gosa-si-client) with a command that is safe and runnable on more operating systems.
Closes #377
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10260 594d385d-05f5-0310-b6e9-bd551577e9d8
Closes #377
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10260 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-client | patch | blob | history |
diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client
index a56292bcd33dc6190ffb8467e597efce66bddd48..c8116dc938fb0ddbcbc106ac1e3b38e67f504823 100755 (executable)
--- a/gosa-si/gosa-si-client
+++ b/gosa-si/gosa-si-client
foreach my $section (keys %cfg_defaults) {
foreach my $param (keys %{$cfg_defaults{ $section }}) {
my $pinfo = $cfg_defaults{ $section }{ $param };
- ${@$pinfo[ 0 ]} = $cfg->val( $section, $param, @$pinfo[ 1 ] );
+ ${@$pinfo[ 0 ]} = (defined($cfg))?$cfg->val( $section, $param, @$pinfo[ 1 ] ):${@$pinfo[ 0 ]} = @$pinfo[ 1 ];
}
}
}
my ($signal) = @_;
daemon_log("shutting down gosa-si-client", 1);
- system("killall gosa-si-client");
+ system("kill `ps -C gosa-si-client -o pid=`");
}
$SIG{INT} = \&sig_int_handler;
# add gosa-si-server address from config file at first position of server list
my $server_check_cfg = Config::IniFiles->new( -file => $cfg_file );
-my $server_check = $server_check_cfg->val( "server", "ip");
+my $server_check = (defined($server_check_cfg))?$server_check_cfg->val( "server", "ip"):undef;
if( defined $server_check ) {
unshift(@servers, $server_address);
my $servers_string = join(", ", @servers);