summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorhagbard <vyosdev@derith.de>2019-04-25 13:09:20 -0700
committerhagbard <vyosdev@derith.de>2019-04-25 13:09:20 -0700
commitdcb9f521f9f6dbb98df8f644009c05342f596b5a (patch)
treeda0954f9de9c90812fcf51e80f846850f18cf831 /src/conf_mode
parent2cd0498f50296d5d9e80b6acafb63dd3d45fb5cd (diff)
downloadvyos-1x-dcb9f521f9f6dbb98df8f644009c05342f596b5a.tar.gz
vyos-1x-dcb9f521f9f6dbb98df8f644009c05342f596b5a.zip
[rsyslogd] T1355 - rsyslog stopped after reboot or clean start
- rsyslog appears now to be started via systemd automatically, checking for the pid to avoid restart race condition between systemd vyos conf script
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/syslog.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/conf_mode/syslog.py b/src/conf_mode/syslog.py
index d600146f3..c8541a4a0 100755
--- a/src/conf_mode/syslog.py
+++ b/src/conf_mode/syslog.py
@@ -279,19 +279,12 @@ def verify(c):
raise ConfigError('Invalid logging level ' + s + ' set in '+ conf + ' ' + item)
def apply(c):
- ### vyatta-log.conf is being generated somewhere
- ### this is just a quick hack to remove the old configfile
-
- if c == None:
- ### systemd restarts it, using kill
- #os.system("sudo systemctl stop rsyslog >/dev/null 2>&1")
- print ("systemd sends messages to rsyslog, rsyslog won't be stopped")
+ if not os.path.exits('/var/run/rsyslogd.pid'):
+ os.system("sudo systemctl start rsyslog >/dev/null")
else:
- if os.path.exists('/etc/rsyslog.d/vyatta-log.conf'):
- os.remove('/etc/rsyslog.d/vyatta-log.conf')
-
os.system("sudo systemctl restart rsyslog >/dev/null")
+
if __name__ == '__main__':
try:
c = get_config()