We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56f5d3a commit d52de72Copy full SHA for d52de72
.templates/mariadb/iotstack_healthcheck.sh
@@ -8,7 +8,13 @@ HEALTHCHECK_PORT="${MYSQL_TCP_PORT:-3306}"
8
EXPECTED="mysqld is alive"
9
10
# run the check
11
-RESPONSE=$(mysqladmin -p${MYSQL_ROOT_PASSWORD} ping -h localhost)
+if [ -z "$MYSQL_ROOT_PASSWORD" ] ; then
12
+ RESPONSE=$(mysqladmin ping -h localhost)
13
+else
14
+ # note - there is NO space between "-p" and the password. This is
15
+ # intentional. It is part of the mysql and mysqladmin API.
16
+ RESPONSE=$(mysqladmin -p${MYSQL_ROOT_PASSWORD} ping -h localhost)
17
+fi
18
19
# did the mysqladmin command succeed?
20
if [ $? -eq 0 ] ; then
0 commit comments