summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThomas Arendsen Hein <thomas@intevation.de>2009-03-17 13:15:16 (GMT)
committerThomas Arendsen Hein <thomas@intevation.de>2009-03-17 13:15:16 (GMT)
commit2c80512db5de7f09cc7566bcc64d0d29168a8dc3 (patch)
tree6bb0379dfaad5751ddd97a2d99fe00740ee46dec /lib
parent2611b7678432cd9d11c91b7ddb2284c4db4d78f8 (diff)
downloadperl-Kolab-2c80512db5de7f09cc7566bcc64d0d29168a8dc3.tar.gz
Use RUNONCHANGE mechanism to restart or reload apache, amavisd and clamav.
This finishes the transition of all easy targets to RUNONCHANGE as mentioned in kolab/issue1679 ([kolabconf] Update template META mechanism to support service restarts)
Diffstat (limited to 'lib')
-rw-r--r--lib/Kolab/Conf.pm28
1 files changed, 2 insertions, 26 deletions
diff --git a/lib/Kolab/Conf.pm b/lib/Kolab/Conf.pm
index f6a3655..bcdf0c9 100644
--- a/lib/Kolab/Conf.pm
+++ b/lib/Kolab/Conf.pm
@@ -291,21 +291,12 @@ sub build {
if ($rc) {
if ($cfg =~ /postfix/) {
$haschanged{'postfix'} = 1;
- } elsif ($cfg =~ /apache/) {
- $haschanged{'apache'} = 1;
} elsif ($cfg =~ /openldap/) {
$haschanged{'slapd'} = 1;
} elsif ($cfg =~ /imapd/) {
$haschanged{'imapd'} = 1;
- } elsif ($cfg =~ /amavisd/) {
- $haschanged{'amavisd'} = 1;
- } elsif ($cfg =~ /clamav/) {
- $haschanged{'clamav'} = 1;
-#} elsif ($cfg =~ /example/) {
- } else {
- Kolab::log('T', "`$cfg' change detected ", KOLAB_DEBUG );
- }
- $templatehaschanged{$tmpl} = 1;
+ }
+ $templatehaschanged{$tmpl} = 1;
Kolab::log('T', "`$cfg' change detected: $rc", KOLAB_DEBUG );
}
@@ -844,11 +835,6 @@ sub reload
system("$Kolab::config{'KOLABRC'} rc openldap restart &");
}
- if ($haschanged{'apache'}) {
- &Kolab::log('K', 'Reloading Apache...');
- system("$Kolab::config{sbindir}/apachectl graceful");
- }
-
if ($haschanged{'postfix'}) {
&Kolab::log('K', 'Reloading Postfix...');
system("$Kolab::config{sbindir}/postfix reload");
@@ -860,16 +846,6 @@ sub reload
system("$Kolab::config{'KOLABRC'} rc imapd restart");
}
- if ($haschanged{'amavisd'}) {
- &Kolab::log('K', 'Restarting amavisd...');
- system("$Kolab::config{'KOLABRC'} rc amavisd restart");
- }
-
- if ($haschanged{'clamav'}) {
- &Kolab::log('K', 'Restarting clamav...');
- system("$Kolab::config{'KOLABRC'} rc clamav restart");
- }
-
%Kolab::Conf::haschanged = ();
&Kolab::log('K', 'Reload finished');