Update 99-run.sh

This commit is contained in:
Alexandre
2025-02-06 13:32:51 +01:00
committed by GitHub
parent bbf6e51a2f
commit ba52b1c258

View File

@@ -63,3 +63,35 @@ else
bashio::log.info "Automatic updates not set in addon config. If you add configuration files in ${CONFIGSOURCE}/import_files, they won't be automatically updated."
fi
##############
# LAUNCH APP #
##############
bashio::log.info "Starting entrypoint scripts"
export silent="false"
if bashio::config.true 'silent'; then
bashio::log.warning "Silent mode activated. Only errors will be shown. Please disable in addon options if you need to debug"
export silent="true"
fi
sudo -E su - www-data -s /bin/bash -c 'cd /var/www/html
for SCRIPTS in /etc/entrypoint.d/*; do
[ -e "$SCRIPTS" ] || continue
echo "$SCRIPTS: executing"
source "$SCRIPTS" || { echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?"; exit $?; }
done
if [[ "$silent" == "true" ]]; then
echo "Starting : php-fpm"
/usr/local/sbin/php-fpm --nodaemonize >/dev/null
echo "Starting : nginx"
nginx >/dev/null & true
else
echo "Starting : php-fpm"
/usr/local/sbin/php-fpm --nodaemonize
echo "Starting : nginx"
nginx & true
fi
'
sleep infinity