-
This commit is contained in:
parent
2afc09b644
commit
1e599fe221
9
run.sh
9
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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user