This commit is contained in:
Alexandre
2023-01-08 08:13:33 +01:00
committed by GitHub
parent e1ab21cf57
commit 12e5fe68b0
3 changed files with 7 additions and 7 deletions

View File

@@ -93,11 +93,11 @@ RESULT=`mysql -u "${username}" -p"${password}" -h "${host}" -P "${port}" --skip-
if [ "$RESULT" == "$dbname" ]; then if [ "$RESULT" == "$dbname" ]; then
# database already exists, do healthcheck with upgrade-db # database already exists, do healthcheck with upgrade-db
bashio::log.info "Existing database, checking health with upgrade-db...." bashio::log.info "Existing database, checking health with upgrade-db...."
s6-setuidgid nginx php8 /app/bin/upgrade-db.php>/dev/null s6-setuidgid nginx php /app/bin/upgrade-db.php>/dev/null
# database already exists, do healthcheck with upgrade-db # database already exists, do healthcheck with upgrade-db
bashio::log.info "Existing database, clearing cache with upgrade-db" bashio::log.info "Existing database, clearing cache with upgrade-db"
bashio::log.info "to fix potential cache corruption..." bashio::log.info "to fix potential cache corruption..."
s6-setuidgid nginx php8 /app/bin/upgrade-db.php --clear-cache -yes >/dev/null s6-setuidgid nginx php /app/bin/upgrade-db.php --clear-cache -yes >/dev/null
else else
# database does not yet exist # database does not yet exist
bashio::log.info "Creating database with default settings...." bashio::log.info "Creating database with default settings...."
@@ -106,9 +106,9 @@ else
-h "${host}" -P "${port}" \ -h "${host}" -P "${port}" \
-e "CREATE DATABASE ${dbname};" -e "CREATE DATABASE ${dbname};"
# init database with default values # init database with default values
s6-setuidgid nginx php8 /app/bin/upgrade-db.php s6-setuidgid nginx php /app/bin/upgrade-db.php
# set systemtype to public (as we're behind ingress) # set systemtype to public (as we're behind ingress)
s6-setuidgid nginx php8 /app/bin/upgrade-db.php --set-systemtype public s6-setuidgid nginx php /app/bin/upgrade-db.php --set-systemtype public
# we also set some sane default settings # we also set some sane default settings
mysql \ mysql \
-u "${username}" -p"${password}" \ -u "${username}" -p"${password}" \
@@ -122,4 +122,4 @@ else
fi fi
# Run check-cache at boot to fix potential cache problems # Run check-cache at boot to fix potential cache problems
s6-setuidgid nginx php8 /app/bin/check-cache.php s6-setuidgid nginx php /app/bin/check-cache.php

View File

@@ -6,4 +6,4 @@
bashio::log.info "Running daily spotweb cache check" &>/proc/1/fd/1 bashio::log.info "Running daily spotweb cache check" &>/proc/1/fd/1
s6-setuidgid nginx php8 /app/bin/check-cache.php &>/proc/1/fd/1 s6-setuidgid nginx php /app/bin/check-cache.php &>/proc/1/fd/1

View File

@@ -6,4 +6,4 @@
bashio::log.info "Running hourly cron job" &>/proc/1/fd/1 bashio::log.info "Running hourly cron job" &>/proc/1/fd/1
s6-setuidgid nginx php8 /app/retrieve.php &>/proc/1/fd/1 s6-setuidgid nginx php /app/retrieve.php &>/proc/1/fd/1