Seafile : amelioration script d'installation

This commit is contained in:
Gitouche 2022-01-30 18:37:39 +01:00
parent 7571f5c8c1
commit 476ac77a30
1 changed files with 9 additions and 10 deletions

View File

@ -29,17 +29,16 @@ SEAFILE_ADMIN_EMAIL=${GARBAYE_SEAFILE_ADMIN_EMAIL}
EOT
export GARBAYE_SEAFILE_SEAFILE_VERSION="${seafile_release}"
podman-compose up -d
echo -n "Waiting for seahub_settings.py "
podman-compose up -d && \
echo -n "Waiting for seahub_settings.py " && \
while [ ! -e `get_podman_volume_path ${datavolume}`/seafile/conf/seahub_settings.py ]; do
echo -n "."
sleep 1
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" `get_podman_volume_path ${datavolume}`/seafile/conf/seahub_settings.py
podman pod stop ${pod_name} && echo Pod built and stopped.
# cleanup
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" `get_podman_volume_path ${datavolume}`/seafile/conf/seahub_settings.py && \
echo -n "Waiting for seahub to finish starting " && \
( podman logs -f seafile 2>&1 & ) | grep -q 'Seahub is started' && \
echo "OK" && \
podman pod stop ${pod_name} && \
echo Pod built and stopped. && \
shred -u .env