diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-12-26 10:01:22 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-12-26 10:01:32 +0100 |
commit | de28cb2036af6e7786ff54f1732d3a33439442e8 (patch) | |
tree | f4da920b3bfdc7ba37c37c4174fd66644476d406 /src/conf_mode | |
parent | 3854031667c397412d04697509f02b097e401e9a (diff) | |
download | vyos-1x-de28cb2036af6e7786ff54f1732d3a33439442e8.tar.gz vyos-1x-de28cb2036af6e7786ff54f1732d3a33439442e8.zip |
flow-accounting: T4097: move configuration file to /run
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/flow_accounting_conf.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/conf_mode/flow_accounting_conf.py b/src/conf_mode/flow_accounting_conf.py index 74d304493..e01f3066b 100755 --- a/src/conf_mode/flow_accounting_conf.py +++ b/src/conf_mode/flow_accounting_conf.py @@ -34,7 +34,7 @@ from vyos import ConfigError from vyos import airbag airbag.enable() -uacctd_conf_path = '/etc/pmacct/uacctd.conf' +uacctd_conf_path = '/run/pmacct/uacctd.conf' iptables_nflog_table = 'raw' iptables_nflog_chain = 'VYATTA_CT_PREROUTING_HOOK' egress_iptables_nflog_table = 'mangle' @@ -252,8 +252,10 @@ def apply(flow_config): _iptables_config([], 'ingress') _iptables_config([], 'egress') - # Stop flow-accounting daemon + # Stop flow-accounting daemon and remove configuration file cmd('systemctl stop uacctd.service') + if os.path.exists(uacctd_conf_path): + os.unlink(uacctd_conf_path) return # Start/reload flow-accounting daemon |