punix
9d44e7ab42
- Add run_as Bash script and open_gitea.py python script - Add Tooltip disable/enable - Rename settings to settings.conf for theme, updates and tooltip enable in one file
15 lines
332 B
Python
Executable File
15 lines
332 B
Python
Executable File
#!/usr/bin/python3
|
|
from subprocess import check_call
|
|
from pathlib import Path
|
|
|
|
path_to_file = Path('/etc/wire_py/settings.conf')
|
|
|
|
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
|
|
|