Improve systemd services start

The logscraper and logsender might not start, because the container
with the same name is still present in the runtime.
This commit will remove previous container if it still present and
should give more time for systemd before start new container.

Change-Id: I808b2251bfa50e68fe30283ec97a55fdfb4406ca
This commit is contained in:
Daniel Pawlik 2024-08-09 12:10:05 +02:00
parent 3ac0c035e8
commit d47815c04c
No known key found for this signature in database
2 changed files with 6 additions and 4 deletions

View File

@ -8,8 +8,9 @@ StartLimitBurst=5
Type=simple
SyslogIdentifier=logscraper-{{ item.tenant }}
Restart=always
RestartSec=3s
ExecStop=-/usr/bin/podman stop -t 10 logscraper-{{ item.tenant }}
RestartSec=12s
ExecStop=/usr/bin/podman stop -t 10 logscraper-{{ item.tenant }}
ExecStopPost=/usr/bin/podman rm -i logscraper-{{ item.tenant }}
ExecStart=/usr/local/bin/logscraper-{{ item.tenant }}
[Install]

View File

@ -8,8 +8,9 @@ StartLimitBurst=5
Type=simple
SyslogIdentifier=logsender-{{ item.tenant }}
Restart=always
RestartSec=3s
ExecStop=-/usr/bin/podman stop -t 10 logsender-{{ item.tenant }}
RestartSec=12s
ExecStop=/usr/bin/podman stop -t 10 logsender-{{ item.tenant }}
ExecStopPost=/usr/bin/podman rm -i logsender-{{ item.tenant }}
ExecStart=/usr/local/bin/logsender-{{ item.tenant }}
[Install]