little fixes replace os.system with check_call

first steps in install Script add wg_start.service file
This commit is contained in:
2024-09-08 20:31:46 +02:00
parent 607589d44a
commit 35406026f0
6 changed files with 109 additions and 56 deletions

View File

@ -3,10 +3,10 @@ from subprocess import check_call
from pathlib import Path
home = Path.home()
path_to_file = home / 'Pyapps/wire-py/wg_py'
path_to_file = home / '.config/wire_py/wg_py'
with open(path_to_file, 'r') as file:
for line in file.readlines():
a_con = line[5:]
check_call(['nmcli', 'connection', 'up', a_con])
file.close()