Wire-Py/start_wg.py

13 lines
273 B
Python
Raw Permalink Normal View History

2024-09-07 23:52:16 +02:00
#!/usr/bin/python3
from subprocess import check_call
from pathlib import Path
2024-09-07 23:52:16 +02:00
path_to_file = Path.home() / '.config/wire_py/wg_py'
if Path.exists(path_to_file):
a_con = Path.read_text(path_to_file)
check_call(['nmcli', 'connection', 'up', a_con])
else:
pass