2024-09-07 23:52:16 +02:00
|
|
|
#!/usr/bin/python3
|
|
|
|
from subprocess import check_call
|
2024-09-15 02:09:43 +02:00
|
|
|
from pathlib import Path
|
2024-09-07 23:52:16 +02:00
|
|
|
|
2024-10-28 07:13:44 +01:00
|
|
|
path_to_file = Path('/etc/wire_py/settings.conf')
|
2024-09-15 02:09:43 +02:00
|
|
|
|
2024-10-28 07:13:44 +01:00
|
|
|
with open(path_to_file, 'r') as a_con:
|
|
|
|
lines = a_con.readlines()
|
|
|
|
a_con = lines[7].strip()
|
|
|
|
if a_con != 'off':
|
|
|
|
check_call(['nmcli', 'connection', 'up', a_con])
|
|
|
|
else:
|
|
|
|
pass
|
2024-09-10 20:06:33 +02:00
|
|
|
|