powerdns-admin/docker-test/start.sh
Ymage 8dd03a4d85 Update tests fix
Fix migration init_db 'id'
Handle app context when needed
Fix conftest fixtures
Rearrange test Dockerfiles
Hide DeprecationWarning during pytest execution
Upgrade all python packages
2022-12-22 22:47:02 +01:00

25 lines
606 B
Bash

#!/usr/bin/env sh
if [ -z ${PDNS_API_KEY+x} ]; then
API_KEY=changeme
fi
if [ -z ${PDNS_PORT+x} ]; then
WEB_PORT=8081
fi
# Import schema structure
if [ -e "/data/pdns.sql" ]; then
rm -f /data/pdns.db
cat /data/pdns.sql | sqlite3 /data/pdns.db
rm -f /data/pdns.sql
echo "Imported schema structure"
fi
chown -R pdns:pdns /data/
/usr/sbin/pdns_server \
--launch=gsqlite3 --gsqlite3-database=/data/pdns.db \
--webserver=yes --webserver-address=0.0.0.0 --webserver-port=${PDNS_PORT} \
--api=yes --api-key=$PDNS_API_KEY --webserver-allow-from=${PDNS_WEBSERVER_ALLOW_FROM}