From 91b7ed19be58a1e0df5daffb945d915ee4d715bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= Date: Fri, 21 Feb 2025 01:18:56 +0100 Subject: [PATCH] [pdnsadmin] allow user creation to fail, creating the same user multiple times isn't a good idea --- lib/pdnsadmin.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pdnsadmin.sh b/lib/pdnsadmin.sh index 88568b2..9504e95 100644 --- a/lib/pdnsadmin.sh +++ b/lib/pdnsadmin.sh @@ -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" }