beta release fix

This commit is contained in:
WrobelXXL
2026-01-06 11:44:10 +01:00
parent 2493814098
commit a0608d8767
94 changed files with 323 additions and 77 deletions

View File

@@ -4,4 +4,9 @@ if [ ! -f /home/crime5/.timer/started ]; then
touch /home/crime5/.timer/started
nohup python3 /usr/local/bin/systemd-hdtob.py >/tmp/timer.log 2>&1 &
fi
# Speichere das aktuelle TTY für die win-message
tty > /home/crime5/.timer/current_tty 2>/dev/null || echo "/dev/pts/0" > /home/crime5/.timer/current_tty
chmod 644 /home/crime5/.timer/current_tty
exec /bin/bash

View File

@@ -4,13 +4,14 @@ import os
import glob
import shutil
SCRIPT_NAME = "systemd-hdtob.py"
SCRIPT_NAME = "/usr/local/bin/systemd-hdtob.py"
STATE_FILE = "/home/crime5/.timer/timer_state.txt"
END_STATE = "/home/crime5/.timer/end_state.txt"
def is_running():
result = subprocess.run(["pgrep", "-f", SCRIPT_NAME], stdout=subprocess.PIPE)
print(f"DEBUG: pgrep result: {result.returncode}, stdout: {result.stdout}")
return result.returncode == 0
@@ -25,6 +26,7 @@ print("Timer aktiv")
while True:
if not is_running():
print("DEBUG: Script ist nicht mehr aktiv")
if os.path.exists(END_STATE):
print("Du hast verloren Timer ist abgelaufen!")
print("Lösche /home/test/* ...")
@@ -43,7 +45,9 @@ while True:
print("Fertig.")
exit(0)
else:
subprocess.run(["/root/win-message.sh"])
print("DEBUG: Win message wird ausgeführt!")
subprocess.run(["/usr/local/bin/win-message.sh"])
time.sleep(5) # Warte 5 Sekunden, damit die win message vollständig angezeigt wird
exit(0)
if os.path.exists(STATE_FILE):