aboutsummaryrefslogtreecommitdiffstats
path: root/del-syslog
diff options
context:
space:
mode:
Diffstat (limited to 'del-syslog')
-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 {