Move collect.py into server/; split main() into server/main.py

run() stays in server/collect.py with relative imports.
main() (CLI arg parsing, credential loading) moves to server/main.py.
install.sh updated to use `python -m server.main` (required for relative
imports to resolve correctly when invoked as a module).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-27 18:30:39 +02:00
co-authored by Claude Sonnet 4.6
parent 423e6d3027
commit 5230b304a2
3 changed files with 116 additions and 114 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ Wants=network-online.target
[Service]
Type=simple
WorkingDirectory=$SCRIPT_DIR
ExecStart=$PYTHON $SCRIPT_DIR/collect.py -c $CREDS_FILE
ExecStart=$PYTHON -m server.main -c $CREDS_FILE
Restart=on-failure
RestartSec=60
StandardOutput=journal