Files
M-CTF-2025/darkbazaar/docker-entrypoint.sh

15 lines
328 B
Bash
Raw Permalink Normal View History

2025-12-14 10:39:18 +03:00
#!/bin/sh
set -e
if [ -z "$DATABASE_URL" ]; then
echo "Error: DATABASE_URL is not set."
exit 1
fi
echo "* * * * * root PYTHONPATH=/app DATABASE_URL=\"$DATABASE_URL\" /usr/local/bin/python3 -m src.cleaner > /proc/1/fd/1 2>&1" > /etc/cron.d/cleaner_job
chmod 0644 /etc/cron.d/cleaner_job
touch /var/log/cron.log
exec "$@"