feat: add feature to update cachyOS in the background

This commit is contained in:
2026-05-05 08:30:33 +02:00
parent 4a0ae14f8b
commit 3ea6ce58b3
15 changed files with 1190 additions and 0 deletions

26
bin/cachyos-updater Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/env python3
"""Point d'entrée du daemon CachyOS Updater (doit tourner en root)."""
import asyncio
import logging
import os
import sys
if os.geteuid() != 0:
print("Erreur : ce daemon doit être lancé en tant que root.", file=sys.stderr)
sys.exit(1)
sys.path.insert(0, "/usr/lib/cachyos-updater")
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(levelname)s] %(message)s",
stream=sys.stdout,
)
from daemon import Daemon
try:
asyncio.run(Daemon().run())
except KeyboardInterrupt:
pass

15
bin/cachyos-updater-shutdown Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
"""Installateur de mises à jour au moment de l'extinction (doit tourner en root)."""
import os
import sys
if os.geteuid() != 0:
print("Erreur : doit être lancé en tant que root.", file=sys.stderr)
sys.exit(1)
sys.path.insert(0, "/usr/lib/cachyos-updater")
import shutdown_installer
shutdown_installer.run()

11
bin/cachyos-updater-ui Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env python3
"""Interface graphique CachyOS Updater."""
import sys
sys.path.insert(0, "/usr/lib/cachyos-updater")
from ui import UpdaterApp
app = UpdaterApp()
sys.exit(app.run(sys.argv))