Ändere den Typ des Services in der Datei yourpart-daemon.service von 'simple' auf 'notify' und füge die Option NotifyAccess hinzu. Verbessere die Signalverarbeitung in main.cpp, um ein sauberes Herunterfahren der Anwendung zu ermöglichen und die Hauptschleife anzupassen.

This commit is contained in:
Torsten Schulz (local)
2025-09-01 15:13:56 +02:00
committed by Torsten (PC)
parent 698160b701
commit b05a17b4fb
2 changed files with 19 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ After=network.target postgresql.service
Wants=postgresql.service
[Service]
Type=simple
Type=notify
User=yourpart
Group=yourpart
WorkingDirectory=/opt/yourpart
@@ -18,6 +18,7 @@ TimeoutStartSec=30
TimeoutStopSec=30
Restart=always
RestartSec=5
NotifyAccess=main
StandardOutput=journal
StandardError=journal
SyslogIdentifier=yourpart-daemon