ich möchte einen Systemd Service installieren für folgendes Tool: https://github.com/splitbrain/Watcher
Habe dazu die /etc/systemd/system/watcher.service angelegt mit folgendem Inhalt:
Code: Alles auswählen
[Unit]
Description=Watcher
After=network.target
[Service]
Type=simple
Restart=always
ExecStart=/root/scripte/watcher/watcher.py start -c /root/scripte/watcher/watcher.ini
[Install]
WantedBy=multi-user.target
/root/scripte/watcher/watcher.py start -c /root/scripte/watcher/watcher.ini
startet und läuft der Dienst sauber durch. Aber wenn ich systemctl start watcher ; systemctl status watcher mache kommt:
Code: Alles auswählen
root@ycloud:/var/log$ systemctl status watcher
● watcher.service - Watcher
Loaded: loaded (/etc/systemd/system/watcher.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2020-09-29 08:16:08 CEST; 11min ago
Process: 23877 ExecStart=/root/scripte/watcher/watcher.py start -c /root/scripte/watcher/watcher.ini (code=exited, status=1/FAILURE)
Main PID: 23877 (code=exited, status=1/FAILURE)
Sep 29 08:16:08 ycloud systemd[1]: watcher.service: Service RestartSec=100ms expired, scheduling restart.
Sep 29 08:16:08 ycloud systemd[1]: watcher.service: Scheduled restart job, restart counter is at 5.
Sep 29 08:16:08 ycloud systemd[1]: Stopped Watcher.
Sep 29 08:16:08 ycloud systemd[1]: watcher.service: Start request repeated too quickly.
Sep 29 08:16:08 ycloud systemd[1]: watcher.service: Failed with result 'exit-code'.
Sep 29 08:16:08 ycloud systemd[1]: Failed to start Watcher.
root@ycloud:/var/log$
Code: Alles auswählen
Sep 29 08:30:34 ycloud watcher.py[29148]: pidfile /var/run/watcher-script.pid already exists. Daemon already running?
Sep 29 08:30:34 ycloud systemd[1]: watcher.service: Main process exited, code=exited, status=1/FAILURE
Sep 29 08:30:34 ycloud systemd[1]: watcher.service: Failed with result 'exit-code'.
Sep 29 08:30:35 ycloud systemd[1]: watcher.service: Service RestartSec=100ms expired, scheduling restart.
Sep 29 08:30:35 ycloud systemd[1]: watcher.service: Scheduled restart job, restart counter is at 1.
Sep 29 08:30:35 ycloud systemd[1]: Stopped Watcher.
Sep 29 08:30:35 ycloud systemd[1]: Started Watcher.
Sep 29 08:30:35 ycloud watcher.py[29149]: pidfile /var/run/watcher-script.pid already exists. Daemon already running?
Sep 29 08:30:35 ycloud systemd[1]: watcher.service: Main process exited, code=exited, status=1/FAILURE
Sep 29 08:30:35 ycloud systemd[1]: watcher.service: Failed with result 'exit-code'.
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Service RestartSec=100ms expired, scheduling restart.
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Scheduled restart job, restart counter is at 2.
Sep 29 08:30:36 ycloud systemd[1]: Stopped Watcher.
Sep 29 08:30:36 ycloud systemd[1]: Started Watcher.
Sep 29 08:30:36 ycloud watcher.py[29150]: pidfile /var/run/watcher-script.pid already exists. Daemon already running?
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Main process exited, code=exited, status=1/FAILURE
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Failed with result 'exit-code'.
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Service RestartSec=100ms expired, scheduling restart.
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Scheduled restart job, restart counter is at 3.
Sep 29 08:30:36 ycloud systemd[1]: Stopped Watcher.
Sep 29 08:30:36 ycloud systemd[1]: Started Watcher.
Sep 29 08:30:36 ycloud watcher.py[29151]: pidfile /var/run/watcher-script.pid already exists. Daemon already running?
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Main process exited, code=exited, status=1/FAILURE
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Failed with result 'exit-code'.
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Service RestartSec=100ms expired, scheduling restart.
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Scheduled restart job, restart counter is at 4.
Sep 29 08:30:36 ycloud systemd[1]: Stopped Watcher.
Sep 29 08:30:36 ycloud systemd[1]: Started Watcher.
Sep 29 08:30:36 ycloud watcher.py[29152]: pidfile /var/run/watcher-script.pid already exists. Daemon already running?
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Main process exited, code=exited, status=1/FAILURE
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Failed with result 'exit-code'.
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Service RestartSec=100ms expired, scheduling restart.
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Scheduled restart job, restart counter is at 5.
Sep 29 08:30:36 ycloud systemd[1]: Stopped Watcher.
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Start request repeated too quickly.
Sep 29 08:30:36 ycloud systemd[1]: watcher.service: Failed with result 'exit-code'.
Sep 29 08:30:36 ycloud systemd[1]: Failed to start Watcher.
Ich habe das so schon mal unter Stretch eingerichtet, dort hat es so funktioniert. Seit der Neuinstallation mit Buster funktioniert es so nicht mehr.
Hat jemand eine Idee?
Edit: habe auch probiert, wie im Internet zu lesen ist, die Zeilen
[Install]
WantedBy=multi-user.target
zu entfernen. Danach systemctl daemon-reload, systemctl start watcher und systemctl status watcher. Fehler bleibt.