From b8e2ca813c3b497ed243ec015f3f8e131ba60631 Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Fri, 4 Jun 2021 11:07:51 +0200 Subject: [PATCH] peerjs-server : update 2/x --- podman-peerjs/50_update.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/podman-peerjs/50_update.sh b/podman-peerjs/50_update.sh index 245fc68..98b5405 100755 --- a/podman-peerjs/50_update.sh +++ b/podman-peerjs/50_update.sh @@ -7,15 +7,21 @@ source ${ABSDIR}/vars.sh ensure_pwd_is_scriptdir ensure_not_root +ensure_container_exists ${container_name} + upstream_imageversion=${upstream_image}:${upstream_version} current_imageversion=$(podman container inspect -f '{{.ImageName}}' ${container_name}) -if [[ "${upstream_imageversion}" != "${current_imageversion}" ]] ; then - echo Container ${container_name} needs to be rebuilt - echo NOT IMPLEMENTED YET - exit 1 -else +if [[ "${upstream_imageversion}" == "${current_imageversion}" ]] ; then echo Container ${container_name} does not needs rebuilding. Exiting exit 0 +else + echo Rebuilding container ${container_name}. fi +podman pull ${upstream_imageversion} + +${ABSDIR}/80_destroy.sh +${ABSDIR}/10_install.sh +${ABSDIR}/20_enable.sh +${ABSDIR}/30_start.sh