summaryrefslogtreecommitdiff
path: root/src/conf_mode/syslog.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode/syslog.py')
-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()