Seafile : introduction et utilisation de la fonction get_podman_volume_path

This commit is contained in:
Gitouche 2022-01-28 12:54:55 +01:00
parent a45d17b066
commit ed28bd840d
2 changed files with 8 additions and 2 deletions

View file

@ -253,3 +253,9 @@ ensure_pod_not_running () {
return 0 return 0
fi fi
} }
# Get podman volume path
# WARNING : this function assumes the volume exists
get_podman_volume_path () {
podman volume inspect --format '{{ .Mountpoint }}' ${1}
}

View file

@ -31,12 +31,12 @@ export GARBAYE_SEAFILE_SEAFILE_VERSION="${seafile_release}"
podman-compose up -d podman-compose up -d
echo -n "Waiting for seahub_settings.py " echo -n "Waiting for seahub_settings.py "
while [ ! -e `podman volume inspect --format '{{ .Mountpoint }}' ${datavolume}`/seafile/conf/seahub_settings.py ]; do while [ ! -e `get_podman_volume_path ${datavolume}`/seafile/conf/seahub_settings.py ]; do
echo -n "." echo -n "."
sleep 1 sleep 1
done ; echo "OK" done ; echo "OK"
sed -i -e "s|^FILE_SERVER_ROOT = \"http://${GARBAYE_SEAFILE_SERVER_HOSTNAME}/seafhttp\"|FILE_SERVER_ROOT = \"https://${GARBAYE_SEAFILE_SERVER_HOSTNAME}/seafhttp\"\nEMAIL_USE_TLS = False\nEMAIL_HOST = '${GARBAYE_SEAFILE_SMTP_SERVER}'\nEMAIL_HOST_USER = ''\nEMAIL_HOST_PASSWORD = ''\nEMAIL_PORT = 25\nDEFAULT_FROM_EMAIL = 'noreply@seafile.garbaye.fr'\nSERVER_EMAIL = 'noreply@seafile.garbaye.fr'|g" `podman volume inspect --format '{{ .Mountpoint }}' ${datavolume}`/seafile/conf/seahub_settings.py sed -i -e "s|^FILE_SERVER_ROOT = \"http://${GARBAYE_SEAFILE_SERVER_HOSTNAME}/seafhttp\"|FILE_SERVER_ROOT = \"https://${GARBAYE_SEAFILE_SERVER_HOSTNAME}/seafhttp\"\nEMAIL_USE_TLS = False\nEMAIL_HOST = '${GARBAYE_SEAFILE_SMTP_SERVER}'\nEMAIL_HOST_USER = ''\nEMAIL_HOST_PASSWORD = ''\nEMAIL_PORT = 25\nDEFAULT_FROM_EMAIL = 'noreply@seafile.garbaye.fr'\nSERVER_EMAIL = 'noreply@seafile.garbaye.fr'|g" `get_podman_volume_path ${datavolume}`/seafile/conf/seahub_settings.py
shred -u .env shred -u .env