services-garbaye/podman-framadate/05_freshinstall.sh

20 lines
582 B
Bash
Raw Normal View History

#!/usr/bin/env bash
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
source ${ABSDIR}/../functions.sh
source ${ABSDIR}/vars.sh
ensure_pwd_is_scriptdir
ensure_not_root
ensure_variables_are_defined "$envvars"
2022-01-28 13:20:49 +00:00
if podman volume exists ${dbvolume} ; then
echo "Volume ${dbvolume} from previous installation already exists"
echo "Please remove them before fresh install, or try to continue with normal installation"
exit 1
fi
podman volume create ${dbvolume} && \
podman unshare chown -R 999:999 `podman volume inspect --format '{{ .Mountpoint }}' ${dbvolume}`