aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@mandriva.org>2007-09-06 12:23:54 +0000
committerGuillaume Rousse <guillomovitch@mandriva.org>2007-09-06 12:23:54 +0000
commitc0fbd2fd8bab4f07883321d01f03bb8870cb42c4 (patch)
tree496b3ea2894c24d048342f824334ae5288a31ab1
parent83288d481d9ef1394b8718b1188be46afd248121 (diff)
downloadrpm-helper-c0fbd2fd8bab4f07883321d01f03bb8870cb42c4.tar
rpm-helper-c0fbd2fd8bab4f07883321d01f03bb8870cb42c4.tar.gz
rpm-helper-c0fbd2fd8bab4f07883321d01f03bb8870cb42c4.tar.bz2
rpm-helper-c0fbd2fd8bab4f07883321d01f03bb8870cb42c4.tar.xz
rpm-helper-c0fbd2fd8bab4f07883321d01f03bb8870cb42c4.zip
relaunch service after configuration modification
-rwxr-xr-xdel-syslog10
1 files changed, 8 insertions, 2 deletions
diff --git a/del-syslog b/del-syslog
index dbcf1c2..e344a44 100755
--- a/del-syslog
+++ b/del-syslog
@@ -6,8 +6,14 @@ die <<EOF if @ARGV < 2;
usage: $0 <pkg> <nb>
EOF
-foreach my $file ('/etc/syslog.conf', '/etc/syslog-ng.conf') {
- del_syslog_entry($package, $file) if -f $file;
+if (-f '/etc/syslog.conf') {
+ del_syslog_entry($package, '/etc/syslog.conf');
+ system(qw/service syslog condrestart/);
+}
+
+if (-f '/etc/syslog-ng.conf') {
+ del_syslog_entry($package, '/etc/syslog-ng.conf');
+ system(qw/service syslog-ng condrestart/);
}
sub del_syslog_entry {