FHEM - Hardware > Server - Linux

FHEM startet nicht "automatisch" neu

(1/1)

Bartimaus:
Hallo Zusammen,

ich beschäftige mich gerade mit "Systemd" um z.b. diverse Cronjobs abzulösen.

Dabei ist mir aufgefallen, das mein FHEM nicht automatisch neu startet, nachdem man es per "sudo service fhem stop" heruntergefahren hat.

Hier meine fhem.service:


--- Code: ---# $Id: fhem.service 19235 2019-04-21 13:26:17Z betateilchen $
[Unit]
Description=FHEM Home Automation
After=network.target
Wants=hmland.service

[Service]
Type=forking
User=fhem
Group=dialout
WorkingDirectory=/opt/fhem
ExecStart=/usr/bin/perl fhem.pl fhem.cfg
ExecStop=/usr/bin/pkill -U fhem perl
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

--- Ende Code ---

Hier mal ein Log nachdem ich FHEM in der Konsole gestoppt habe, dort sieht man, das FHEM erst neu startet, nachdem ich es manuell gestartet habe.


--- Code: ---pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2021-02-13 15:26:21 CET; 1min 51s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
 Main PID: 2892 (perl)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/fhem.service
           └─2892 /usr/bin/perl fhem.pl fhem.cfg

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
pi@RPi4FHEM:~ $ htop
pi@RPi4FHEM:~ $ sudo service fhem stop
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 5s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 12s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 14s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 15s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 19s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 23s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 25s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 26s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 28s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 29s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 30s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 32s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 32s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 34s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 36s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 41s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 42s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 44s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 1min 5s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 1min 12s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo nano /etc/systemd/system/fhem.service
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2021-02-13 15:31:33 CET; 1min 32s ago
  Process: 2890 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
  Process: 3111 ExecStop=/usr/bin/pkill -U fhem perl (code=exited, status=0/SUCCESS)
 Main PID: 2892 (code=exited, status=0/SUCCESS)

Feb 13 15:26:21 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:26:21 RPi4FHEM systemd[1]: Started FHEM Home Automation.
Feb 13 15:31:32 RPi4FHEM systemd[1]: Stopping FHEM Home Automation...
Feb 13 15:31:33 RPi4FHEM systemd[1]: fhem.service: Succeeded.
Feb 13 15:31:33 RPi4FHEM systemd[1]: Stopped FHEM Home Automation.
pi@RPi4FHEM:~ $ sudo service fhem start
pi@RPi4FHEM:~ $ sudo service fhem status
● fhem.service - FHEM Home Automation
   Loaded: loaded (/etc/systemd/system/fhem.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2021-02-13 15:33:14 CET; 3s ago
  Process: 3290 ExecStart=/usr/bin/perl fhem.pl fhem.cfg (code=exited, status=0/SUCCESS)
 Main PID: 3292 (perl)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/fhem.service
           └─3292 /usr/bin/perl fhem.pl fhem.cfg

Feb 13 15:33:14 RPi4FHEM systemd[1]: Starting FHEM Home Automation...
Feb 13 15:33:14 RPi4FHEM systemd[1]: Started FHEM Home Automation.
--- Ende Code ---

Hat jemand ne Idee ?

MadMax-FHEM:
Warum soll denn fhem automatisch starten, wenn du den Dienst MANUELL stoppst!!?

Es sollte automatisch nach einem REBOOT wieder laufen...
...sonst nicht!

Das "autostart" im Service-Script sorgt nur dafür, dass es bei einem ABSTURZ o.ä. (oder auch shutdown [restart] per fhemWeb) wieder autom. gestartet wird.

Bei einem MANUELLEN Stopp ist die "Arbeit" des Scripts "auf Anwender-Wunsch" beendet... ;)

Also ein "Fehler" ist es nur, wenn auch nach einem REBOOT fhem nicht autom. läuft/gestartet wird/wurde...

Gruß, Joachim

Bartimaus:
Hi Joachim,

danke für die schnelle Antwort.

Ich hatte

"Restart=always" halt als "immer" interpretiert.
"Restart=on-failure" hätte ich der reinen Übersetzung nach als das vermutet was Du beschrieben hast.

FHEM startet automatisch nach einem reboot, da der Service via " sudo systemctl enable fhem.service" aktiviert wurde.

Dann schaue ich jetzt mal, ob FHEM bei mir wirklich neu startet, wenn ich es aus FHEM aus beende.....


Edith: Du hast Recht, FHEM startet via service neu, wenn ich es aus FHEM heraus beende....  ;D

Wernieman:
Das ist eben so auch Absicht. Bei der Serverwartung ist es manchmal wichtig, ein Prozess Manuell dauerhaft beenden zu können. Dann macht man aber auch ein manuellen start (oder ein Reboot)

betateilchen:
Helau!
Kamelle statt Popcorn!

Navigation

[0] Themen-Index

Zur normalen Ansicht wechseln