2022-01-17 21:15:42 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
|
|
|
|
source ${ABSDIR}/../functions.sh
|
|
|
|
source ${ABSDIR}/vars.sh
|
|
|
|
|
|
|
|
ensure_pwd_is_scriptdir
|
|
|
|
ensure_not_root
|
|
|
|
|
|
|
|
ensure_variables_are_defined "$envvars"
|
|
|
|
|
2022-01-28 11:45:26 +00:00
|
|
|
if ! podman volume exists ${dbvolume} ; then
|
|
|
|
echo "Error : DB volume ${dbvolume} does not exists. Consider running 05_freshinstall.sh if this is the first install."
|
2022-01-17 21:15:42 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-01-28 11:45:26 +00:00
|
|
|
if ! podman volume exists ${datavolume} ; then
|
|
|
|
echo "Error : DATA volume ${datavolume} does not exists. Consider running 05_freshinstall.sh if this is the first install."
|
2022-01-17 21:15:42 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
cat <<EOT >> .env
|
|
|
|
MYSQL_ROOT_PASSWORD=${GARBAYE_SEAFILE_MYSQL_ROOT_PASSWORD}
|
|
|
|
DB_ROOT_PASSWD=${GARBAYE_SEAFILE_MYSQL_ROOT_PASSWORD}
|
|
|
|
SEAFILE_ADMIN_PASSWORD=${GARBAYE_SEAFILE_ADMIN_PASSWORD}
|
|
|
|
SEAFILE_SERVER_HOSTNAME=${GARBAYE_SEAFILE_SERVER_HOSTNAME}
|
|
|
|
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 "
|
2022-01-28 11:54:55 +00:00
|
|
|
while [ ! -e `get_podman_volume_path ${datavolume}`/seafile/conf/seahub_settings.py ]; do
|
2022-01-17 21:15:42 +00:00
|
|
|
echo -n "."
|
|
|
|
sleep 1
|
|
|
|
done ; echo "OK"
|
|
|
|
|
2022-01-28 11:54:55 +00:00
|
|
|
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
|
2022-01-17 21:15:42 +00:00
|
|
|
|
|
|
|
shred -u .env
|
|
|
|
|
|
|
|
./40_stop.sh
|
|
|
|
|
|
|
|
echo All good : pod ${pod_name} built and stopped
|