FHEM startet nicht "automatisch" neu

Begonnen von Bartimaus, 13 Februar 2021, 15:43:07

Vorheriges Thema - Nächstes Thema

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:

# $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


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.

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.


Hat jemand ne Idee ?
LG
B.


FHEM@Intel-J4105@Debian-LXC, CUL1101,FS20,IT,DS18B20,DS2413(Heizungslogger),DS2423(Stromlogger)Homematic,HM-LAN,ZWave,MiniCULs,Shelly

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
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

Bartimaus

#2
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
LG
B.


FHEM@Intel-J4105@Debian-LXC, CUL1101,FS20,IT,DS18B20,DS2413(Heizungslogger),DS2423(Stromlogger)Homematic,HM-LAN,ZWave,MiniCULs,Shelly

Wernieman

#3
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)
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

betateilchen

-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!