[experimental] des corrections peerjs-server
This commit is contained in:
parent
832c3c1940
commit
6e31334d74
|
@ -42,5 +42,5 @@ check_container_exists () {
|
|||
}
|
||||
|
||||
check_container_running () {
|
||||
[[ $("podman container inspect -f '{{.State.Status}}' ${1}") == "running" ]] || exit 1
|
||||
[[ "podman container inspect -f '{{.State.Status}}' ${1}" != "running" ]]
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ ensure_pwd_is_scriptdir
|
|||
ensure_not_root
|
||||
|
||||
echo "Checking podman images..."
|
||||
podman images ${image_name}
|
||||
podman images ${upstream_image}
|
||||
echo "Checking container status..."
|
||||
podman ps -a | grep ${container_name}
|
||||
echo "Checking systemd unit status..."
|
||||
|
|
|
@ -16,5 +16,4 @@ ensure_systemd_as_user_dir_exists
|
|||
podman generate systemd --name ${container_name} > ${HOME}/.config/systemd/user/${service_name}
|
||||
|
||||
podman stop ${container_name}
|
||||
systemctl --user enable ${service_name}
|
||||
systemctl --user start ${service_name}
|
||||
systemctl --user --now enable ${service_name}
|
||||
|
|
|
@ -20,11 +20,12 @@ check_systemd_unit_running ${service_name} && {
|
|||
}
|
||||
|
||||
# FAIL if container is running
|
||||
check_container_running ${container_name} && {
|
||||
check_container_running ${container_name} || {
|
||||
echo Container ${container_name} is running. Stop it first.
|
||||
exit 1
|
||||
}
|
||||
|
||||
rm -f ${HOME}/.config/systemd/user/${service_name}
|
||||
systemctl --user disable ${service_name}
|
||||
systemctl --user daemon-reload
|
||||
podman rm ${container_name}
|
||||
|
|
Loading…
Reference in a new issue