summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-04-05 17:34:33 +0100
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-04-06 20:22:35 +0100
commit1c85a72fc338dab5266cff6faffd12f1505512c9 (patch)
tree987817685ae3cc82da2b32b933d2b66a33b84527
parent7a13deeb0c7eee6691c831f354c6661a53f7bfe3 (diff)
downloadvyos-1x-1c85a72fc338dab5266cff6faffd12f1505512c9.tar.gz
vyos-1x-1c85a72fc338dab5266cff6faffd12f1505512c9.zip
util: T2226: rewrite syslog to use run
-rwxr-xr-xsrc/conf_mode/system-syslog.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/conf_mode/system-syslog.py b/src/conf_mode/system-syslog.py
index 8c0a6629c..915a631ec 100755
--- a/src/conf_mode/system-syslog.py
+++ b/src/conf_mode/system-syslog.py
@@ -24,6 +24,7 @@ from vyos.config import Config
from vyos.defaults import directories as vyos_data_dir
from vyos.util import subprocess_cmd
from vyos import ConfigError
+from vyos.util import run
def get_config():
c = Config()
@@ -253,10 +254,8 @@ def verify(c):
def apply(c):
if not c:
- subprocess_cmd('systemctl stop syslog')
- return None
-
- subprocess_cmd('systemctl restart syslog')
+ return run('systemctl stop syslog')
+ return run('systemctl restart syslog')
if __name__ == '__main__':
try: