ntfy : ajout volume de donnees
This commit is contained in:
parent
4bf63cf7e2
commit
f96003f3d0
18
podman-ntfy/05_freshinstall.sh
Executable file
18
podman-ntfy/05_freshinstall.sh
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
|
||||||
|
source ${ABSDIR}/../functions.sh
|
||||||
|
source ${ABSDIR}/vars.sh
|
||||||
|
|
||||||
|
ensure_pwd_is_scriptdir
|
||||||
|
ensure_not_root
|
||||||
|
|
||||||
|
if podman volume exists ${ntfy_data_volume}; then
|
||||||
|
echo "Files or volumes from previous installation already exists"
|
||||||
|
echo "Please remove them before fresh install, or try continue with normal installation"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
podman volume create ${ntfy_data_volume}
|
||||||
|
podman unshare chown -R 100:65533 `get_podman_volume_path ${ntfy_data_volume}`
|
||||||
|
${ABSDIR}/10_install.sh
|
|
@ -10,6 +10,11 @@ ensure_not_root
|
||||||
ensure_container_not_exists ${container_name}
|
ensure_container_not_exists ${container_name}
|
||||||
ensure_variables_are_defined "$envvars"
|
ensure_variables_are_defined "$envvars"
|
||||||
|
|
||||||
|
if ! podman volume exists ${ntfy_data_volume} ; then
|
||||||
|
echo "Error : data volume ${ntfy_data_volume} does not exists. Consider running 05_freshinstall.sh if this is the first install."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if ! podman image exists ${ntfy_image}:${ntfy_version}; then
|
if ! podman image exists ${ntfy_image}:${ntfy_version}; then
|
||||||
podman image pull ${ntfy_image}:${ntfy_version} || exit 1
|
podman image pull ${ntfy_image}:${ntfy_version} || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -11,4 +11,4 @@ envvars='GARBAYE_NTFY_BASE_URL'
|
||||||
project_name=${PWD##*/}
|
project_name=${PWD##*/}
|
||||||
container_name="${project_name}"
|
container_name="${project_name}"
|
||||||
service_name="container-${container_name}.service"
|
service_name="container-${container_name}.service"
|
||||||
|
ntfy_data_volume='ntfy-data'
|
||||||
|
|
Loading…
Reference in a new issue