From d544d731a7775f49dd52bda87d74208bae0a68af Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 17 Jan 2022 13:25:10 +0100 Subject: [PATCH] Keep shebang if s6 supervision --- addons_updater/rootfs/entrypoint.sh | 3 ++- arpspoof/rootfs/entrypoint.sh | 3 ++- cloudcommander/rootfs/entrypoint.sh | 3 ++- enedisgateway2mqtt/rootfs/entrypoint.sh | 3 ++- enedisgateway2mqtt_dev/rootfs/entrypoint.sh | 3 ++- filebrowser/rootfs/entrypoint.sh | 3 ++- fireflyiii/rootfs/entrypoint.sh | 3 ++- fireflyiii_data_importer/rootfs/entrypoint.sh | 3 ++- flaresolverr/rootfs/entrypoint.sh | 3 ++- gazpar2mqtt/rootfs/entrypoint.sh | 3 ++- inadyn/rootfs/entrypoint.sh | 3 ++- joal/rootfs/entrypoint.sh | 3 ++- joplin/rootfs/entrypoint.sh | 3 ++- photoprism/rootfs/entrypoint.sh | 3 ++- tandoor_recipes/rootfs/entrypoint.sh | 3 ++- webtrees/rootfs/entrypoint.sh | 3 ++- whoogle/rootfs/entrypoint.sh | 3 ++- 17 files changed, 34 insertions(+), 17 deletions(-) diff --git a/addons_updater/rootfs/entrypoint.sh b/addons_updater/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/addons_updater/rootfs/entrypoint.sh +++ b/addons_updater/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/arpspoof/rootfs/entrypoint.sh b/arpspoof/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/arpspoof/rootfs/entrypoint.sh +++ b/arpspoof/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/cloudcommander/rootfs/entrypoint.sh b/cloudcommander/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/cloudcommander/rootfs/entrypoint.sh +++ b/cloudcommander/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/enedisgateway2mqtt/rootfs/entrypoint.sh b/enedisgateway2mqtt/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/enedisgateway2mqtt/rootfs/entrypoint.sh +++ b/enedisgateway2mqtt/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/enedisgateway2mqtt_dev/rootfs/entrypoint.sh b/enedisgateway2mqtt_dev/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/enedisgateway2mqtt_dev/rootfs/entrypoint.sh +++ b/enedisgateway2mqtt_dev/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/filebrowser/rootfs/entrypoint.sh b/filebrowser/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/filebrowser/rootfs/entrypoint.sh +++ b/filebrowser/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/fireflyiii/rootfs/entrypoint.sh b/fireflyiii/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/fireflyiii/rootfs/entrypoint.sh +++ b/fireflyiii/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/fireflyiii_data_importer/rootfs/entrypoint.sh b/fireflyiii_data_importer/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/fireflyiii_data_importer/rootfs/entrypoint.sh +++ b/fireflyiii_data_importer/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/flaresolverr/rootfs/entrypoint.sh b/flaresolverr/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/flaresolverr/rootfs/entrypoint.sh +++ b/flaresolverr/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/gazpar2mqtt/rootfs/entrypoint.sh b/gazpar2mqtt/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/gazpar2mqtt/rootfs/entrypoint.sh +++ b/gazpar2mqtt/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/inadyn/rootfs/entrypoint.sh b/inadyn/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/inadyn/rootfs/entrypoint.sh +++ b/inadyn/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/joal/rootfs/entrypoint.sh b/joal/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/joal/rootfs/entrypoint.sh +++ b/joal/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/joplin/rootfs/entrypoint.sh b/joplin/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/joplin/rootfs/entrypoint.sh +++ b/joplin/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/photoprism/rootfs/entrypoint.sh b/photoprism/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/photoprism/rootfs/entrypoint.sh +++ b/photoprism/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/tandoor_recipes/rootfs/entrypoint.sh b/tandoor_recipes/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/tandoor_recipes/rootfs/entrypoint.sh +++ b/tandoor_recipes/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/webtrees/rootfs/entrypoint.sh b/webtrees/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/webtrees/rootfs/entrypoint.sh +++ b/webtrees/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/whoogle/rootfs/entrypoint.sh b/whoogle/rootfs/entrypoint.sh index ba3d7c058..f60beeda3 100644 --- a/whoogle/rootfs/entrypoint.sh +++ b/whoogle/rootfs/entrypoint.sh @@ -10,6 +10,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" - sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS" || true + # Change shebang if no s6 supervision + if [ -d /etc/s6 ]; then sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"; fi /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done