mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
Update 90-spotweb
This commit is contained in:
@@ -92,7 +92,7 @@ do
|
||||
done
|
||||
|
||||
# Check if database already exists
|
||||
RESULT=`mysql -u "${username}" -p"${password}" -h "${host}" -P "${port}" --skip-column-names -e "SHOW DATABASES LIKE '${dbname}'"`
|
||||
RESULT=`/usr/bin/maria -u "${username}" -p"${password}" -h "${host}" -P "${port}" --skip-column-names -e "SHOW DATABASES LIKE '${dbname}'"`
|
||||
if [ "$RESULT" == "$dbname" ]; then
|
||||
# database already exists, do healthcheck with upgrade-db
|
||||
bashio::log.info "Existing database, checking health with upgrade-db...."
|
||||
@@ -104,7 +104,7 @@ if [ "$RESULT" == "$dbname" ]; then
|
||||
else
|
||||
# database does not yet exist
|
||||
bashio::log.info "Creating database with default settings...."
|
||||
mysql \
|
||||
/usr/bin/maria \
|
||||
-u "${username}" -p"${password}" \
|
||||
-h "${host}" -P "${port}" \
|
||||
-e "CREATE DATABASE ${dbname};"
|
||||
@@ -113,7 +113,7 @@ else
|
||||
# set systemtype to public (as we're behind ingress)
|
||||
s6-setuidgid nginx php /app/bin/upgrade-db.php --set-systemtype public
|
||||
# we also set some sane default settings
|
||||
mysql \
|
||||
/usr/bin/maria \
|
||||
-u "${username}" -p"${password}" \
|
||||
-h "${host}" -P "${port}" \
|
||||
-D "${dbname}" \
|
||||
|
||||
Reference in New Issue
Block a user