Fixes a new user files create
This commit is contained in:
parent
97bf9df041
commit
8771be760d
@ -8,6 +8,12 @@ My standard System: Linux Mint 22 Cinnamon
|
|||||||
- for loops with lists replaced by List Comprehensions
|
- for loops with lists replaced by List Comprehensions
|
||||||
- Crypt and Decrypt Config Files in ~/.config/wire_py
|
- Crypt and Decrypt Config Files in ~/.config/wire_py
|
||||||
|
|
||||||
|
### Added
|
||||||
|
03-03-2025
|
||||||
|
|
||||||
|
- Fixes a new user files create
|
||||||
|
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
02-03-2025
|
02-03-2025
|
||||||
|
|
||||||
|
@ -20,6 +20,8 @@ gettext.bindtextdomain(APP, LOCALE_DIR)
|
|||||||
gettext.textdomain(APP)
|
gettext.textdomain(APP)
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
wg_set = Path(Path.home() / '.config/wire_py/settings')
|
||||||
|
|
||||||
def dirs_and_files():
|
def dirs_and_files():
|
||||||
|
|
||||||
pth = Path.home() / '.config/wire_py'
|
pth = Path.home() / '.config/wire_py'
|
||||||
@ -32,7 +34,7 @@ def dirs_and_files():
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
sett.touch()
|
sett.touch()
|
||||||
sett.write_text('[UPDATES]\non\n[THEME]\nlight\n[TOOLTIP]\nTrue\n[AUTOSTART ON]\noff')
|
sett.write_text('[UPDATES]\non\n[THEME]\nlight\n[TOOLTIP]\nTrue\n[AUTOSTART ON]\noff\n')
|
||||||
|
|
||||||
if ks.exists():
|
if ks.exists():
|
||||||
pass
|
pass
|
||||||
@ -51,10 +53,8 @@ def files_for_autostart():
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
wg_ser.touch()
|
wg_ser.touch()
|
||||||
sett.write_text('[Unit]\nDescription=Automatic Tunnel Start\nAfter=network-online.target\n\n[Service]\nType=oneshot\nExecStartPre=/bin/sleep 5\nExecStart=/usr/local/bin/start_wg.py\n[Install]\nWantedBy=default.target')
|
wg_ser.write_text('[Unit]\nDescription=Automatic Tunnel Start\nAfter=network-online.target\n\n[Service]\nType=oneshot\nExecStartPre=/bin/sleep 5\nExecStart=/usr/local/bin/start_wg.py\n[Install]\nWantedBy=default.target')
|
||||||
check_call(['systemctl', '--user', 'enable', wg_start.service])
|
check_call(['systemctl', '--user', 'enable', 'wg_start.service'])
|
||||||
|
|
||||||
wg_set = Path(Path.home() / '.config/wire_py/settings')
|
|
||||||
|
|
||||||
|
|
||||||
class GiteaUpdate:
|
class GiteaUpdate:
|
||||||
@ -303,6 +303,3 @@ class Tipi:
|
|||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
wg_tips = Tipi.if_tip(wg_set)
|
|
||||||
|
@ -10,12 +10,14 @@ import tkinter as tk
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from subprocess import check_call
|
from subprocess import check_call
|
||||||
from tkinter import filedialog, ttk, TclError
|
from tkinter import filedialog, ttk, TclError
|
||||||
from cls_mth_fc import (Tunnel, msg_window, GiteaUpdate, wg_tips, dirs_and_files, wg_set, files_for_autostart)
|
from cls_mth_fc import (Tunnel, dirs_and_files, msg_window, Tipi, GiteaUpdate ,files_for_autostart)
|
||||||
|
|
||||||
tcl_path = Path('/usr/share/TK-Themes')
|
tcl_path = Path('/usr/share/TK-Themes')
|
||||||
|
wg_set = Path(Path.home() / '.config/wire_py/settings')
|
||||||
|
wg_tips = Tipi.if_tip(wg_set)
|
||||||
|
|
||||||
''' 1 = 1. Year, 09 = Month of the Year, 2924 = Day and Year of the Year '''
|
''' 1 = 1. Year, 09 = Month of the Year, 2924 = Day and Year of the Year '''
|
||||||
version = 'v. 2.02.2425'
|
version = 'v. 2.03.0325'
|
||||||
|
|
||||||
res = GiteaUpdate.api_down('https://git.ilunix.de/api/v1/repos/punix/Wire-Py/releases', version)
|
res = GiteaUpdate.api_down('https://git.ilunix.de/api/v1/repos/punix/Wire-Py/releases', version)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user