diff options
-rw-r--r-- | op-mode-definitions/dns-forwarding.xml | 8 | ||||
-rwxr-xr-x | scripts/build-command-op-templates | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/op-mode-definitions/dns-forwarding.xml b/op-mode-definitions/dns-forwarding.xml index b072fab79..e789f4aee 100644 --- a/op-mode-definitions/dns-forwarding.xml +++ b/op-mode-definitions/dns-forwarding.xml @@ -14,7 +14,7 @@ <properties> <help>Show DNS forwarding statistics</help> </properties> - <command>${vyos_op_scripts_dir}/dns_forwarding_statistics.py</command> + <command>sudo ${vyos_op_scripts_dir}/dns_forwarding_statistics.py</command> </leafNode> </children> </node> @@ -33,7 +33,7 @@ <properties> <help>Restart DNS forwarding service</help> </properties> - <command>${vyos_op_scripts_dir}/dns_forwarding_restart.sh</command> + <command>sudo ${vyos_op_scripts_dir}/dns_forwarding_restart.sh</command> </leafNode> </children> </node> @@ -52,13 +52,13 @@ </properties> <children> <tagNode name="domain"> - <command>${vyos_op_scripts_dir}/dns_forwarding_reset.py $5</command> + <command>sudo ${vyos_op_scripts_dir}/dns_forwarding_reset.py $5</command> <properties> <help>Reset DNS forwarding cache for a domain</help> </properties> </tagNode> <leafNode name="all"> - <command>${vyos_op_scripts_dir}/dns_forwarding_reset.py --all</command> + <command>sudo ${vyos_op_scripts_dir}/dns_forwarding_reset.py --all</command> <properties> <help>Reset DNS forwarding cache</help> </properties> diff --git a/scripts/build-command-op-templates b/scripts/build-command-op-templates index 25f03cf91..0383c8982 100755 --- a/scripts/build-command-op-templates +++ b/scripts/build-command-op-templates @@ -137,7 +137,7 @@ def make_node_def(props, command): if command is not None: - node_def += "run: sudo sh -c \"{0}\"\n".format(command.text) + node_def += "run: {0}\n".format(command.text) if debug: |