Systemd restarts my process which is not dead

Viewed 824

I have the current systemd service /etc/systemd/system/getty@tty1.service.d/override.conf:

[Service]
ExecStart=
ExecStart=-/home/auto/script.sh
Type=simple
StandardInput=tty
StandardOutput=tty

The point is, user turn on the computer and can manage few stuff on the computer and didnt need to log in.

Systemd starts the scripts it works fine. But after few minutes systemd restart "script.sh" for no reason. I think the problem is "script.sh" starts some child process and systemd does not like it.

After a restart I can find these lines in syslog:

Sep 25 12:33:32 hostname systemd[1]: getty@tty1.service: Service has no hold-off time, scheduling restart.
Sep 25 12:33:32 hostname systemd[1]: getty@tty1.service: Scheduled restart job, restart counter is at 1.
Sep 25 12:33:32 hostname systemd[1]: Stopped Getty on tty1.
Sep 25 12:33:32 hostname systemd[1]: getty@tty1.service: Found left-over process 1711 (docker) in control group while starting unit. Ignoring.
Sep 25 12:33:32 hostname systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.

I tried a lot of things like Type=forking or RestartSec=86400s but Systemd still restart script.sh.

Any idea?

Best regards,

0 Answers
Related