Ä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:
committed by
Torsten (PC)
parent
391e5d9992
commit
d3727ad2f7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user