diff --git a/fireflyiii_data_importer/rootfs/etc/cont-init.d/99-run.sh b/fireflyiii_data_importer/rootfs/etc/cont-init.d/99-run.sh index 1240113c7..45bd8dc9c 100755 --- a/fireflyiii_data_importer/rootfs/etc/cont-init.d/99-run.sh +++ b/fireflyiii_data_importer/rootfs/etc/cont-init.d/99-run.sh @@ -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