[pdnsadmin] allow user creation to fail, creating the same user multiple times isn't a good idea

This commit is contained in:
Bernhard Rosenkränzer 2025-02-21 01:18:56 +01:00
parent 099f7a97e5
commit 91b7ed19be

View File

@ -92,7 +92,8 @@ start_pdnsadmin() {
start_service "pdnsadmin" "nc -z 192.168.0.12 9494 &> /dev/null" "8"
# Run MySQL command to create admin user for pdns admin interface
docker exec pdnsmysql bash -c "mariadb -updns -p$MYSQL_PASSWORD pdns -e '$PDNS_MYSQL_COMMAND;'"
# Allowed to fail because the user may already be there from a previous start.
docker exec pdnsmysql bash -c "mariadb -updns -p$MYSQL_PASSWORD pdns -e '$PDNS_MYSQL_COMMAND;'" || :
echo -ne "done.\n"
}