Seafile : amelioration script d'installation

This commit is contained in:
Gitouche 2022-01-30 18:37:39 +01:00
parent 7571f5c8c1
commit 476ac77a30

View file

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