From e3d710258b1f3aef71b3dbdfd265c6bf5805517e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 13 Apr 2020 20:38:15 +0200 Subject: op-mode: T2185: adjust flow-accounting systemd service name --- src/op_mode/flow_accounting_op.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/op_mode/flow_accounting_op.py b/src/op_mode/flow_accounting_op.py index 71fdfc288..bf8c39fd6 100755 --- a/src/op_mode/flow_accounting_op.py +++ b/src/op_mode/flow_accounting_op.py @@ -70,7 +70,7 @@ def _is_host(host): # check if flow-accounting running def _uacctd_running(): - command = '/usr/bin/sudo /bin/systemctl status uacctd > /dev/null' + command = 'systemctl status uacctd.service > /dev/null' return run(command) == 0 # get list of interfaces @@ -195,7 +195,7 @@ if not _uacctd_running(): # restart pmacct daemon if cmd_args.action == 'restart': # run command to restart flow-accounting - cmd('/usr/bin/sudo /bin/systemctl restart uacctd', + cmd('systemctl restart uacctd.service', message='Failed to restart flow-accounting') # clear in-memory collected flows -- cgit v1.2.3