I created an unit file, with the following lines to start-up a podman container. Unfortunately, right after starting up, journalctl -xe
tells me service not needed, shutting down, service shuts down. podman ps --all
says exited (0)
, hence, it is a regular stop.
[Unit]
Description=Service for auto-start the Podman NGINX Container
After=syslog.target
After=network.target
[Service]
Type=simple
User=root
Group=root
ExecStart=podman start nginx
ExecStop=podman stop nginx
[Install]
WantedBy=multi-user.target
I tried also some variants with StopWhenUnneeded=false
, which made no difference.
System is RedHat8. The official RedHat-description to solve this didn't work.