mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-14 01:20:27 +00:00
8dd03a4d85
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
25 lines
606 B
Bash
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}
|