Fixed a typo, added a comment regarding sudo safety and set commands.sh executable
This commit is contained in:
parent
bc44648c30
commit
116a480e41
@ -101,7 +101,9 @@ def run_wg(*args, input: str=None):
|
|||||||
return result.stdout
|
return result.stdout
|
||||||
|
|
||||||
def run_command(command, *args) -> None:
|
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])
|
subprocess.run(['sudo', command_path.absolute(), command, *args])
|
||||||
|
|
||||||
def create_route(client_ip: ipaddress) -> None:
|
def create_route(client_ip: ipaddress) -> None:
|
||||||
|
0
commands.sh
Normal file → Executable file
0
commands.sh
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user