From 476ac77a30658c354f5f7b83b8b8eb325f2b6a43 Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Sun, 30 Jan 2022 18:37:39 +0100 Subject: [PATCH] Seafile : amelioration script d'installation --- podman-seafile/10_install.sh | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/podman-seafile/10_install.sh b/podman-seafile/10_install.sh index 9a6a452..fb46500 100755 --- a/podman-seafile/10_install.sh +++ b/podman-seafile/10_install.sh @@ -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