2024-02-14 16:36:01 -03:00
|
|
|
#!/bin/bash
|
|
|
|
|
set -e
|
|
|
|
|
|
2024-07-01 16:37:44 -03:00
|
|
|
# Lets wait for the DNS container to start
|
|
|
|
|
sleep 5
|
|
|
|
|
|
2024-02-14 16:36:01 -03:00
|
|
|
# Starts each WireGuard configuration file found in /etc/wireguard
|
|
|
|
|
shopt -s nullglob
|
|
|
|
|
config_files=(/etc/wireguard/*.conf)
|
|
|
|
|
if [ ${#config_files[@]} -gt 0 ]; then
|
|
|
|
|
for f in "${config_files[@]}"; do
|
|
|
|
|
wg-quick up "$(basename "${f}" .conf)"
|
|
|
|
|
done
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Django startup
|
|
|
|
|
python manage.py migrate --noinput
|
|
|
|
|
python manage.py collectstatic --noinput
|
2025-12-28 11:45:40 -03:00
|
|
|
exec gunicorn wireguard_webadmin.wsgi:application --bind 0.0.0.0:8000 --workers 2 --threads 2 --timeout 60 --log-level info --capture-output --access-logfile - --error-logfile -
|