Seafile : utilisation de podman volume exists

This commit is contained in:
Gitouche 2022-01-28 12:45:26 +01:00
parent 827f45d600
commit a45d17b066
2 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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