/federated/apps/authelia/.powerdns.client.secret doesn't exist - get the secret from the database
This commit is contained in:
parent
4c836bf231
commit
bf32c041c9
@ -966,13 +966,13 @@ convert_authelia() {
|
|||||||
sed -i "s#$DOMAIN#$DOMAIN_NEW#g" /federated/apps/authelia/data/config/configuration.yml
|
sed -i "s#$DOMAIN#$DOMAIN_NEW#g" /federated/apps/authelia/data/config/configuration.yml
|
||||||
sed -i "s#$DOMAIN#$DOMAIN_NEW#g" /federated/apps/authelia/data/config/idproviders.yml
|
sed -i "s#$DOMAIN#$DOMAIN_NEW#g" /federated/apps/authelia/data/config/idproviders.yml
|
||||||
|
|
||||||
|
POWERDNS_CLIENT_SECRET=$(docker exec pdnsmysql mysql -uroot -p$MYSQL_ROOTPASSWORD $POWERDNS_DB -e "select value from setting where name='oidc_oauth_secret';" |tail -n1)
|
||||||
|
|
||||||
# Configure SSO to Authelia
|
# Configure SSO to Authelia
|
||||||
# Delete the entries in the pdns settings table
|
# Delete the entries in the pdns settings table
|
||||||
[[ -d "/federated/apps/pdnsmysql/data/var/lib/mysql/pdnsadmin" ]] && POWERDNS_DB="pdnsadmin" || POWERDNS_DB="pdns"
|
[[ -d "/federated/apps/pdnsmysql/data/var/lib/mysql/pdnsadmin" ]] && POWERDNS_DB="pdnsadmin" || POWERDNS_DB="pdns"
|
||||||
docker exec pdnsmysql mysql -uroot -p$MYSQL_ROOTPASSWORD $POWERDNS_DB -e "delete from setting where name like '%oidc_oauth%';"
|
docker exec pdnsmysql mysql -uroot -p$MYSQL_ROOTPASSWORD $POWERDNS_DB -e "delete from setting where name like '%oidc_oauth%';"
|
||||||
|
|
||||||
POWERDNS_CLIENT_SECRET=$(cat /federated/apps/authelia/.powerdns.client.secret)
|
|
||||||
|
|
||||||
# Insert PowerDNS configuration because we need an initial
|
# Insert PowerDNS configuration because we need an initial
|
||||||
# config for Authelia to run
|
# config for Authelia to run
|
||||||
PDNS_MYSQL_COMMAND1="insert into setting (name, value) values (\"oidc_oauth_enabled\", \"True\");insert into setting (name, value) values (\"oidc_oauth_key\", \"powerdns\");"
|
PDNS_MYSQL_COMMAND1="insert into setting (name, value) values (\"oidc_oauth_enabled\", \"True\");insert into setting (name, value) values (\"oidc_oauth_key\", \"powerdns\");"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user