Fixes a new user files create

This commit is contained in:
Désiré Werner Menrath 2025-03-03 18:27:49 +01:00
parent 97bf9df041
commit 8771be760d
3 changed files with 15 additions and 10 deletions

View File

@ -8,6 +8,12 @@ My standard System: Linux Mint 22 Cinnamon
- for loops with lists replaced by List Comprehensions
- Crypt and Decrypt Config Files in ~/.config/wire_py
### Added
03-03-2025
- Fixes a new user files create
### Added
02-03-2025

View File

@ -20,6 +20,8 @@ gettext.bindtextdomain(APP, LOCALE_DIR)
gettext.textdomain(APP)
_ = gettext.gettext
wg_set = Path(Path.home() / '.config/wire_py/settings')
def dirs_and_files():
pth = Path.home() / '.config/wire_py'
@ -32,7 +34,7 @@ def dirs_and_files():
else:
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():
pass
@ -51,10 +53,8 @@ def files_for_autostart():
else:
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')
check_call(['systemctl', '--user', 'enable', wg_start.service])
wg_set = Path(Path.home() / '.config/wire_py/settings')
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'])
class GiteaUpdate:
@ -303,6 +303,3 @@ class Tipi:
return False
else:
return True
wg_tips = Tipi.if_tip(wg_set)

View File

@ -10,12 +10,14 @@ import tkinter as tk
from pathlib import Path
from subprocess import check_call
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')
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 '''
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)