diff --git a/podman-peerjs/30_start.sh b/podman-peerjs/30_start.sh index 9a5b4ce..a84b398 100755 --- a/podman-peerjs/30_start.sh +++ b/podman-peerjs/30_start.sh @@ -12,4 +12,6 @@ if systemctl --user is-active --quiet service ${service_name}; then exit 1 fi +# Add check if running, ask to stop it first, then exit. + systemctl --user start ${service_name} diff --git a/podman-peerjs/40_stop.sh b/podman-peerjs/40_stop.sh index 7aad7da..0441370 100755 --- a/podman-peerjs/40_stop.sh +++ b/podman-peerjs/40_stop.sh @@ -12,4 +12,6 @@ if ! systemctl --user is-active --quiet service ${service_name}; then exit 1 fi +# Check if running through podman (no systemd), stop with podman stop , then exit + systemctl --user stop ${service_name} diff --git a/podman-peerjs/70_disable.sh b/podman-peerjs/70_disable.sh index 0268cd9..0416248 100755 --- a/podman-peerjs/70_disable.sh +++ b/podman-peerjs/70_disable.sh @@ -7,6 +7,10 @@ source ${ABSDIR}/vars.sh ensure_pwd_is_scriptdir ensure_not_root -podman stop ${container_name} -systemctl --user disable ${service_name} +# check if active in systemd, then systemctl --user stop ${service_name} +# check if running in podman, then +podman stop ${container_name} + +# always +systemctl --user disable ${service_name} diff --git a/podman-peerjs/80_destroy.sh b/podman-peerjs/80_destroy.sh index ce64ecd..bb179dd 100755 --- a/podman-peerjs/80_destroy.sh +++ b/podman-peerjs/80_destroy.sh @@ -12,7 +12,7 @@ if ! podman container exists ${container_name}; then exit 1 fi -# add check if running, stop first -# add check if systemctl exists, disable first +# add check if running, ask to stop first +# add check if systemctl exists, ask to disable first podman rm ${container_name}