Stop addon if protected is on

https://github.com/alexbelgium/hassio-addons/issues/2037#issuecomment-3222032887
This commit is contained in:
Alexandre
2025-08-26 08:36:27 +02:00
committed by GitHub
parent 6eae6ac578
commit eef16cf3bf

View File

@@ -69,7 +69,7 @@ RUN chmod 777 /ha_entrypoint.sh /ha_entrypoint_modif.sh && /ha_entrypoint_modif.
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/bashio-standalone.sh" "/.bashio-standalone.sh"
RUN chmod 777 /.bashio-standalone.sh
RUN sed -i "1a bashio::require.unprotected" /etc/cont-init.d/90-run.sh
RUN sed -i "1a if ! bashio::require.unprotected; then bashio::addon.stop; fi" /etc/cont-init.d/90-run.sh
############
# 5 Labels #