From a45d17b0662aa945d872dbe37000ae14ed507a23 Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Fri, 28 Jan 2022 12:45:26 +0100 Subject: [PATCH] Seafile : utilisation de podman volume exists --- podman-seafile/05_freshinstall.sh | 8 ++++---- podman-seafile/10_install.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/podman-seafile/05_freshinstall.sh b/podman-seafile/05_freshinstall.sh index 81870ec..bdd7589 100755 --- a/podman-seafile/05_freshinstall.sh +++ b/podman-seafile/05_freshinstall.sh @@ -9,14 +9,14 @@ ensure_not_root ensure_variables_are_defined "$envvars" -if [[ -d ~/.local/share/containers/storage/volumes/${dbvolume} ]]; then - echo "Error : conf volume ${dbvolume} already exists." +if podman volume exists ${dbvolume} ; then + echo "Error : DB volume ${dbvolume} already exists." echo "Please remove it before a freshinstall, or continue with a standard installation." exit 1 fi -if [[ -d ~/.local/share/containers/storage/volumes/${datavolume} ]]; then - echo "Error : data volume ${datavolume} already exists." +if podman volume exists ${datavolume} ; then + echo "Error : DATA volume ${datavolume} already exists." echo "Please remove it before a freshinstall, or continue with a standard installation." exit 1 fi diff --git a/podman-seafile/10_install.sh b/podman-seafile/10_install.sh index f7fbcc1..bc9fb30 100755 --- a/podman-seafile/10_install.sh +++ b/podman-seafile/10_install.sh @@ -9,13 +9,13 @@ ensure_not_root ensure_variables_are_defined "$envvars" -if [[ ! -d ~/.local/share/containers/storage/volumes/${dbvolume} ]]; then - echo "Error : conf volume ${dbvolume} does not exists. Consider running 05_freshinstall.sh if this is the first install." +if ! podman volume exists ${dbvolume} ; then + echo "Error : DB volume ${dbvolume} does not exists. Consider running 05_freshinstall.sh if this is the first install." exit 1 fi -if [[ ! -d ~/.local/share/containers/storage/volumes/${datavolume} ]]; then - echo "Error : data volume ${datavolume} does not exists. Consider running 05_freshinstall.sh if this is the first install." +if ! podman volume exists ${datavolume} ; then + echo "Error : DATA volume ${datavolume} does not exists. Consider running 05_freshinstall.sh if this is the first install." exit 1 fi