Compare commits

...

2 Commits

Author SHA1 Message Date
b508f5c58c code: load update client config 2025-12-28 23:39:20 +01:00
8a16a8633b docs: add update client config keys 2025-12-28 23:39:10 +01:00
5 changed files with 17 additions and 5 deletions

View File

@ -22,6 +22,7 @@ By: Codex (GPT-5)
| 28.12.2025 | 🏗️ Planning | ID: Update-Service URL auf update.wlkns.org festgelegt. By: Codex (GPT-5) |
| 28.12.2025 | 🏗️ Planning | ID: EPIC_000009 Update Webservice (External Team) dokumentiert. By: Codex (GPT-5) |
| 28.12.2025 | 🏗️ Planning | ID: TASK_000027-TASK_000029 fuer EPIC_000008 ausgearbeitet. By: Codex (GPT-5) |
| 28.12.2025 | ⚙️ Code | ID: Update-Config Keys in Settings/ENV/README definiert. By: Codex (GPT-5) |
---
## Legende

View File

@ -32,6 +32,10 @@ Set in `/etc/skd/env` (see `env.example`):
- `SKD_DEFAULT_COUNTDOWN`, `SKD_DEFAULT_SOUND`, `SKD_NOTIFY_TIMEOUT`: behavior defaults.
- `SKD_DRY_RUN=true` to test without real account changes or shutdown.
- `SKD_SOUND_PLAYER`/`SKD_SOUND_FILE`, `SKD_NOTIFY_SEND_PATH` if defaults differ.
- Update client:
- `SKD_UPDATE_URL` (default `https://update.wlkns.org`)
- `SKD_UPDATE_TOKEN` (API token for update service)
- `SKD_UPDATE_INTERVAL` (seconds; default 3600)
Notes:
- `./scripts/install.sh` will create `/etc/skd/env` from `env.example` if missing (edit afterwards) and ensure the `skd` service user/group exist.

View File

@ -39,6 +39,9 @@ class Settings:
self.default_sound: bool = os.getenv("SKD_DEFAULT_SOUND", "false").lower() == "true"
self.notify_timeout: int = int(os.getenv("SKD_NOTIFY_TIMEOUT", "5"))
self.dry_run: bool = os.getenv("SKD_DRY_RUN", "false").lower() == "true"
self.update_url: str = os.getenv("SKD_UPDATE_URL", "https://update.wlkns.org")
self.update_token: str = os.getenv("SKD_UPDATE_TOKEN", "")
self.update_interval: int = int(os.getenv("SKD_UPDATE_INTERVAL", "3600"))
# Paths/tools
self.notify_send_path: str = os.getenv("SKD_NOTIFY_SEND_PATH", "notify-send")
self.sound_player: str = os.getenv("SKD_SOUND_PLAYER", "paplay")

View File

@ -21,5 +21,9 @@ SKD_OIDC_STATE_COOKIE_NAME=skd_oidc_state
SKD_DEFAULT_COUNTDOWN=60
SKD_DEFAULT_SOUND=false
SKD_NOTIFY_TIMEOUT=5
# Update client configuration
SKD_UPDATE_URL=https://update.wlkns.org
SKD_UPDATE_TOKEN=
SKD_UPDATE_INTERVAL=3600
# Set to true to test without performing real system changes
SKD_DRY_RUN=false

View File

@ -1,4 +1,4 @@
ID: TASK_000027 | Version: 0.1.0 | Status: Draft
ID: TASK_000027 | Version: 0.1.0 | Status: In Progress
By: Codex (GPT-5)
# TASK_000027: Update endpoint config
@ -10,11 +10,11 @@ Client kennt Update-Endpoint, Auth und Polling-Konfiguration.
US_000026
## Beschreibung
- Konfigurationskeys definieren (z.B. `SKD_UPDATE_URL`, `SKD_UPDATE_TOKEN`, `SKD_UPDATE_INTERVAL`).
- Konfigurationskeys definieren (`SKD_UPDATE_URL`, `SKD_UPDATE_TOKEN`, `SKD_UPDATE_INTERVAL`).
- Default auf `https://update.wlkns.org` festlegen.
- Lesen der Config in Settings/ENV beschreiben.
## Definition of Done (DoD)
- Konfigurations-Keys dokumentiert.
- Default-URL ist festgelegt.
- Client kann Update-Endpoint ueber Konfiguration aufloesen.
- Konfigurations-Keys dokumentiert (`env.example`, README).
- Default-URL ist festgelegt (`https://update.wlkns.org`).
- Settings laden die Update-Konfiguration aus ENV.