diff --git a/cookcli/config.yaml b/cookcli/config.yaml index 6a9c10b..a067391 100644 --- a/cookcli/config.yaml +++ b/cookcli/config.yaml @@ -1,7 +1,7 @@ --- name: CookCLI Server DEV slug: cookcli -version: 0.11.6 +version: 0.11.7 description: "Serveur CookCLI avec synchronisation Git" url: "https://git.thethomaas.net/TheThomaas/home-assistant-apps/src/branch/main/cookcli" arch: diff --git a/cookcli/rootfs/etc/cont-init.d/99-nginx-config.sh b/cookcli/rootfs/etc/cont-init.d/99-nginx-config.sh index 6bce255..baf940a 100644 --- a/cookcli/rootfs/etc/cont-init.d/99-nginx-config.sh +++ b/cookcli/rootfs/etc/cont-init.d/99-nginx-config.sh @@ -55,12 +55,6 @@ http { proxy_redirect http://127.0.0.1:9081/ \$scheme://\$host${INGRESS_PATH}/; proxy_redirect http://127.0.0.1:9081 \$scheme://\$host${INGRESS_PATH}; } - - location = /api/reload { - limit_except POST { deny all; } - proxy_pass http://127.0.0.1:8098; - proxy_read_timeout 120s; - } } } diff --git a/cookcli/rootfs/etc/services.d/reload-listener/run b/cookcli/rootfs/etc/services.d/reload-listener/run index c3dfa39..1f6454c 100644 --- a/cookcli/rootfs/etc/services.d/reload-listener/run +++ b/cookcli/rootfs/etc/services.d/reload-listener/run @@ -1,2 +1,2 @@ #!/usr/bin/with-contenv bashio -exec socat TCP-LISTEN:8098,bind=127.0.0.1,fork,reuseaddr EXEC:/usr/local/bin/reload-http.sh \ No newline at end of file +exec socat TCP-LISTEN:8098,fork,reuseaddr EXEC:/usr/local/bin/reload-http.sh \ No newline at end of file diff --git a/cookcli/rootfs/usr/local/bin/reload-http.sh b/cookcli/rootfs/usr/local/bin/reload-http.sh index 9d6fe98..06f2b5c 100644 --- a/cookcli/rootfs/usr/local/bin/reload-http.sh +++ b/cookcli/rootfs/usr/local/bin/reload-http.sh @@ -2,7 +2,7 @@ # Consomme la requête jusqu'à la ligne vide while IFS= read -r line; do line="${line%$'\r'}"; [ -z "$line" ] && break; done -if /usr/local/bin/git-sync-now.sh >/dev/null 2>&1; then +if /usr/local/bin/git-sync-now.sh >> /proc/1/fd/1 2>&1; then status="200 OK"; body='{"status":"ok"}' else status="500 Internal Server Error"; body='{"status":"error"}'