From 6a9eb11e1e420aafcc07fdcc2a3a3397c3463d5b Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 18 Feb 2020 16:26:53 +0100 Subject: snmp: T2042: remove superfluous sudo calls --- src/conf_mode/snmp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 -- cgit v1.2.3