Fixed a typo, added a comment regarding sudo safety and set commands.sh executable

This commit is contained in:
Erik Thuning 2025-02-27 15:05:16 +01:00
parent bc44648c30
commit 116a480e41
2 changed files with 3 additions and 1 deletions

@ -101,7 +101,9 @@ def run_wg(*args, input: str=None):
return result.stdout
def run_command(command, *args) -> None:
command_path = Path().join('command.sh')
# The command must be called on an absolute path so that it's possible
# to set up a safe sudoers rule for it.
command_path = Path().join('commands.sh')
subprocess.run(['sudo', command_path.absolute(), command, *args])
def create_route(client_ip: ipaddress) -> None:

0
commands.sh Normal file → Executable file