mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-29 11:53:18 +00:00
c22e6a5926
Force services to use ipv4 in server-ce container GitOrigin-RevId: 9cf2734f8506bba15ef3ac11060508d2604d09ad
25 lines
643 B
Bash
Executable file
25 lines
643 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -eux
|
|
|
|
echo "----------------------"
|
|
echo "Expiring deleted users"
|
|
echo "----------------------"
|
|
date
|
|
|
|
ENABLE_CRON_RESOURCE_DELETION=$(cat /etc/container_environment/ENABLE_CRON_RESOURCE_DELETION)
|
|
|
|
if [[ "${ENABLE_CRON_RESOURCE_DELETION:-null}" != "true" ]]; then
|
|
echo "Skipping user expiration due to ENABLE_CRON_RESOURCE_DELETION not set to true"
|
|
exit 0
|
|
fi
|
|
|
|
WEB_URL='http://127.0.0.1:3000'
|
|
|
|
USER=$(cat /etc/container_environment/WEB_API_USER)
|
|
PASS=$(cat /etc/container_environment/WEB_API_PASSWORD)
|
|
|
|
curl -X POST -v -u "${USER}:${PASS}" \
|
|
"${WEB_URL}/internal/expire-deleted-users-after-duration"
|
|
|
|
echo "Done."
|