diff --git a/run.sh b/run.sh index b4f6858..c42a005 100755 --- a/run.sh +++ b/run.sh @@ -30,10 +30,17 @@ if [ "$RUNTIME_MODE" = "addon" ]; then i=0 while [ "$i" -lt 120 ]; do log "registering ingress attempt $((i + 1))/120" - if php -r 'require "/app/lib/bootstrap.php"; $config = app_load_config(); exit(app_register_ingress_url($config) ? 0 : 1);' >/dev/null 2>&1; then + output="$(php -r 'require "/app/lib/bootstrap.php"; $config = app_load_config(); exit(app_register_ingress_url($config) ? 0 : 1);' 2>&1)" + status=$? + if [ "$status" -eq 0 ]; then log "ingress registered" exit 0 fi + if [ -n "$output" ]; then + printf '%s\n' "$output" | while IFS= read -r line; do + [ -n "$line" ] && log "$line" + done + fi i=$((i + 1)) sleep 2 done diff --git a/wall_panel/config.yaml b/wall_panel/config.yaml index 7156405..a7344cd 100755 --- a/wall_panel/config.yaml +++ b/wall_panel/config.yaml @@ -1,6 +1,6 @@ name: Wall Panel description: Wall Panel PHP interface as a Home Assistant add-on -version: "1.0.15" +version: "1.0.16" slug: wall_panel url: https://git.striker72rus.ru/PHP/wallpanell.git init: false diff --git a/wall_panel/run.sh b/wall_panel/run.sh index f3dd7b1..8f088ab 100755 --- a/wall_panel/run.sh +++ b/wall_panel/run.sh @@ -28,10 +28,17 @@ log "storage dir: ${STORAGE_DIR}" i=0 while [ "$i" -lt 120 ]; do log "registering ingress attempt $((i + 1))/120" - if php -r 'require "/app/lib/bootstrap.php"; $config = app_load_config(); exit(app_register_ingress_url($config) ? 0 : 1);' >/dev/null 2>&1; then + output="$(php -r 'require "/app/lib/bootstrap.php"; $config = app_load_config(); exit(app_register_ingress_url($config) ? 0 : 1);' 2>&1)" + status=$? + if [ "$status" -eq 0 ]; then log "ingress registered" exit 0 fi + if [ -n "$output" ]; then + printf '%s\n' "$output" | while IFS= read -r line; do + [ -n "$line" ] && log "$line" + done + fi i=$((i + 1)) sleep 2 done