generalisation podman volume exists

This commit is contained in:
Gitouche 2022-01-28 14:20:49 +01:00
parent e9d20d6969
commit f8d51e49e7
4 changed files with 5 additions and 5 deletions

View file

@ -9,7 +9,7 @@ ensure_not_root
ensure_variables_are_defined "$envvars" ensure_variables_are_defined "$envvars"
if [[ -d ~/.local/share/containers/storage/volumes/${dbvolume} ]]; then if podman volume exists ${dbvolume} ; then
echo "Volume ${dbvolume} from previous installation already exists" echo "Volume ${dbvolume} from previous installation already exists"
echo "Please remove them before fresh install, or try to continue with normal installation" echo "Please remove them before fresh install, or try to continue with normal installation"
exit 1 exit 1

View file

@ -9,7 +9,7 @@ ensure_not_root
ensure_variables_are_defined "$envvars" ensure_variables_are_defined "$envvars"
if [[ ! -d ~/.local/share/containers/storage/volumes/${dbvolume} ]]; then if ! podman volume exists ${dbvolume} ; then
echo "Error : conf volume ${dbvolume} does not exists. Consider running 05_freshinstall.sh if this is the first install." echo "Error : conf volume ${dbvolume} does not exists. Consider running 05_freshinstall.sh if this is the first install."
exit 1 exit 1
fi fi

View file

@ -9,7 +9,7 @@ ensure_not_root
ensure_variables_are_defined "$envvars" ensure_variables_are_defined "$envvars"
if [[ -d ~/.local/share/containers/storage/volumes/${confvolume} ]] || [[ -d ~/.local/share/containers/storage/volumes/${dbvolume} ]]; then if podman volume exists ${confvolume} || podman volume exists ${dbvolume}; then
echo "Files or volumes from previous installation already exists" echo "Files or volumes from previous installation already exists"
echo "Please remove them before fresh install, or try continue with normal installation" echo "Please remove them before fresh install, or try continue with normal installation"
exit 1 exit 1

View file

@ -9,12 +9,12 @@ ensure_not_root
ensure_variables_are_defined "$envvars" ensure_variables_are_defined "$envvars"
if [[ ! -d ~/.local/share/containers/storage/volumes/${confvolume} ]]; then if [[ ! podman volume exists ${confvolume} ]]; then
echo "Error : conf volume ${confvolume} does not exists. Consider running 05_freshinstall.sh if this is the first install." echo "Error : conf volume ${confvolume} does not exists. Consider running 05_freshinstall.sh if this is the first install."
exit 1 exit 1
fi fi
if [[ ! -d ~/.local/share/containers/storage/volumes/${dbvolume} ]]; then if [[ ! podman volume exists ${dbvolume} ]]; then
echo "Error : conf volume ${dbvolume} does not exists. Consider running 05_freshinstall.sh if this is the first install." echo "Error : conf volume ${dbvolume} does not exists. Consider running 05_freshinstall.sh if this is the first install."
exit 1 exit 1
fi fi