40_stop : fix logique
This commit is contained in:
parent
4cf1444509
commit
cf09d424e2
|
@ -15,6 +15,10 @@ if check_systemd_unit_exists ${service_name}; then
|
|||
systemctl --user stop ${service_name} &&
|
||||
echo Systemd service ${service_name} stopped.
|
||||
fi
|
||||
# Leave if container is correctly stopped
|
||||
if ! check_container_running ${container_name}; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check if running through podman (no systemd), stop with podman stop , then exit
|
||||
|
|
|
@ -15,6 +15,10 @@ if check_systemd_unit_exists ${service_name}; then
|
|||
systemctl --user stop ${service_name} &&
|
||||
echo Systemd service ${service_name} stopped.
|
||||
fi
|
||||
# Leave if pod is correctly stopped
|
||||
if ! check_pod_running ${container_name}; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check if running through podman (no systemd), stop with podman stop , then exit
|
||||
|
|
Loading…
Reference in a new issue