summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-02-18 16:26:53 +0100
committerChristian Poessinger <christian@poessinger.com>2020-02-18 16:26:53 +0100
commit6a9eb11e1e420aafcc07fdcc2a3a3397c3463d5b (patch)
tree88c62ee16b8be355c0da975b0c718ee428054a41 /src
parenta198058b9671b41cc4552d8b27c8801c2dd8a64a (diff)
downloadvyos-1x-6a9eb11e1e420aafcc07fdcc2a3a3397c3463d5b.tar.gz
vyos-1x-6a9eb11e1e420aafcc07fdcc2a3a3397c3463d5b.zip
snmp: T2042: remove superfluous sudo calls
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/snmp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/snmp.py b/src/conf_mode/snmp.py
index c6f408329..0f1fe8a79 100755
--- a/src/conf_mode/snmp.py
+++ b/src/conf_mode/snmp.py
@@ -665,7 +665,7 @@ def generate(snmp):
#
# As we are manipulating the snmpd user database we have to stop it first!
# This is even save if service is going to be removed
- os.system("sudo systemctl stop snmpd.service")
+ os.system("systemctl stop snmpd.service")
rmfile(config_file_client)
rmfile(config_file_daemon)
rmfile(config_file_access)
@@ -740,8 +740,8 @@ def apply(snmp):
os.symlink(nonvolatiledir, volatiledir)
# start SNMP daemon
- os.system("sudo systemctl daemon-reload")
- os.system("sudo systemctl restart snmpd.service")
+ os.system("systemctl daemon-reload")
+ os.system("systemctl restart snmpd.service")
# Passwords are not available immediately in the configuration file,
# after daemon startup - we wait until they have been processed by