summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-05-14 16:14:19 +0200
committerGitHub <noreply@github.com>2023-05-14 16:14:19 +0200
commite02a722a3e95696d83abf7fe78893fbb67f40ad3 (patch)
treeaaebf9e43f1eaad464412ec49e59de36269799af /src
parent9e287778e073ee64333120bb58bca08727846aea (diff)
parent85b7b4fea9a5e9fdcfe138ec1f1816594fee70ea (diff)
downloadvyos-1x-e02a722a3e95696d83abf7fe78893fbb67f40ad3.tar.gz
vyos-1x-e02a722a3e95696d83abf7fe78893fbb67f40ad3.zip
Merge pull request #2006 from frebib/frebib/T5224
T5224: Fix `del system syslog`
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/system-syslog.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/conf_mode/system-syslog.py b/src/conf_mode/system-syslog.py
index e646fb0ae..cf34bad2e 100755
--- a/src/conf_mode/system-syslog.py
+++ b/src/conf_mode/system-syslog.py
@@ -111,9 +111,9 @@ def verify(syslog):
def generate(syslog):
if not syslog:
if os.path.exists(rsyslog_conf):
- os.path.unlink(rsyslog_conf)
+ os.unlink(rsyslog_conf)
if os.path.exists(logrotate_conf):
- os.path.unlink(logrotate_conf)
+ os.unlink(logrotate_conf)
return None
@@ -126,9 +126,10 @@ def generate(syslog):
return None
def apply(syslog):
+ systemd_socket = 'syslog.socket'
systemd_service = 'syslog.service'
if not syslog:
- call(f'systemctl stop {systemd_service}')
+ call(f'systemctl stop {systemd_service} {systemd_socket}')
return None
# we need to restart the service if e.g. the VRF name changed