2018-04-17 14:21:42 +00:00
|
|
|
#!/bin/sh
|
2018-06-11 07:12:04 +00:00
|
|
|
|
|
|
|
if [ ! -d "/powerdns-admin/migrations" ]; then
|
|
|
|
/usr/local/bin/flask db init --directory /powerdns-admin/migrations
|
|
|
|
/usr/local/bin/flask db migrate -m "Init DB" --directory /powerdns-admin/migrations
|
|
|
|
/usr/local/bin/flask db upgrade --directory /powerdns-admin/migrations
|
|
|
|
cd /powerdns-admin && ./init_data.py
|
|
|
|
|
|
|
|
else
|
|
|
|
/usr/local/bin/flask db migrate -m "Upgrade BD Schema" --directory /powerdns-admin/migrations
|
|
|
|
/usr/local/bin/flask db upgrade --directory /powerdns-admin/migrations
|
|
|
|
fi
|
|
|
|
|
2018-04-17 14:21:42 +00:00
|
|
|
/usr/bin/supervisord -c /etc/supervisord.conf
|