From 31637b1c41944875daf6f8d122eb9dddcd9abdbc Mon Sep 17 00:00:00 2001 From: Bruvv Date: Sat, 1 Jan 2022 13:57:48 +0100 Subject: [PATCH] changed entrypoint to the make it more bash friendly --- addons_updater/rootfs/entrypoint.sh | 11 +++++------ arpspoof/rootfs/entrypoint.sh | 11 +++++------ cloudcommander/rootfs/entrypoint.sh | 11 +++++------ enedisgateway2mqtt/rootfs/entrypoint.sh | 11 +++++------ enedisgateway2mqtt_dev/rootfs/entrypoint.sh | 13 ++++++------- filebrowser/rootfs/entrypoint.sh | 11 +++++------ fireflyiii/rootfs/entrypoint.sh | 11 +++++------ fireflyiii_data_importer/rootfs/entrypoint.sh | 11 +++++------ flaresolverr/rootfs/entrypoint.sh | 11 +++++------ gazpar2mqtt/rootfs/entrypoint.sh | 11 +++++------ inadyn/rootfs/entrypoint.sh | 11 +++++------ joal/rootfs/entrypoint.sh | 11 +++++------ joplin/rootfs/entrypoint.sh | 11 +++++------ photoprism/rootfs/entrypoint.sh | 11 +++++------ webtrees/rootfs/entrypoint.sh | 11 +++++------ 15 files changed, 76 insertions(+), 91 deletions(-) diff --git a/addons_updater/rootfs/entrypoint.sh b/addons_updater/rootfs/entrypoint.sh index 06b1b88b5..0a4d34c5f 100644 --- a/addons_updater/rootfs/entrypoint.sh +++ b/addons_updater/rootfs/entrypoint.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv bashio - +#!/bin/bash echo "Starting..." #################### @@ -9,8 +8,8 @@ echo "Starting..." for SCRIPTS in /scripts/*; do [ -e "$SCRIPTS" ] || continue 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 - /./$SCRIPTS || echo "$SCRIPTS: exiting $?" + 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 + /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/arpspoof/rootfs/entrypoint.sh b/arpspoof/rootfs/entrypoint.sh index 06b1b88b5..0a4d34c5f 100644 --- a/arpspoof/rootfs/entrypoint.sh +++ b/arpspoof/rootfs/entrypoint.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv bashio - +#!/bin/bash echo "Starting..." #################### @@ -9,8 +8,8 @@ echo "Starting..." for SCRIPTS in /scripts/*; do [ -e "$SCRIPTS" ] || continue 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 - /./$SCRIPTS || echo "$SCRIPTS: exiting $?" + 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 + /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/cloudcommander/rootfs/entrypoint.sh b/cloudcommander/rootfs/entrypoint.sh index 06b1b88b5..0a4d34c5f 100644 --- a/cloudcommander/rootfs/entrypoint.sh +++ b/cloudcommander/rootfs/entrypoint.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv bashio - +#!/bin/bash echo "Starting..." #################### @@ -9,8 +8,8 @@ echo "Starting..." for SCRIPTS in /scripts/*; do [ -e "$SCRIPTS" ] || continue 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 - /./$SCRIPTS || echo "$SCRIPTS: exiting $?" + 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 + /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/enedisgateway2mqtt/rootfs/entrypoint.sh b/enedisgateway2mqtt/rootfs/entrypoint.sh index 06b1b88b5..0a4d34c5f 100644 --- a/enedisgateway2mqtt/rootfs/entrypoint.sh +++ b/enedisgateway2mqtt/rootfs/entrypoint.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv bashio - +#!/bin/bash echo "Starting..." #################### @@ -9,8 +8,8 @@ echo "Starting..." for SCRIPTS in /scripts/*; do [ -e "$SCRIPTS" ] || continue 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 - /./$SCRIPTS || echo "$SCRIPTS: exiting $?" + 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 + /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/enedisgateway2mqtt_dev/rootfs/entrypoint.sh b/enedisgateway2mqtt_dev/rootfs/entrypoint.sh index 06b1b88b5..4962844d8 100644 --- a/enedisgateway2mqtt_dev/rootfs/entrypoint.sh +++ b/enedisgateway2mqtt_dev/rootfs/entrypoint.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv bashio - +#!/bin/bash echo "Starting..." #################### @@ -9,8 +8,8 @@ echo "Starting..." for SCRIPTS in /scripts/*; do [ -e "$SCRIPTS" ] || continue 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 - /./$SCRIPTS || echo "$SCRIPTS: exiting $?" -done + 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 + /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" +done \ No newline at end of file diff --git a/filebrowser/rootfs/entrypoint.sh b/filebrowser/rootfs/entrypoint.sh index 06b1b88b5..0a4d34c5f 100644 --- a/filebrowser/rootfs/entrypoint.sh +++ b/filebrowser/rootfs/entrypoint.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv bashio - +#!/bin/bash echo "Starting..." #################### @@ -9,8 +8,8 @@ echo "Starting..." for SCRIPTS in /scripts/*; do [ -e "$SCRIPTS" ] || continue 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 - /./$SCRIPTS || echo "$SCRIPTS: exiting $?" + 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 + /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/fireflyiii/rootfs/entrypoint.sh b/fireflyiii/rootfs/entrypoint.sh index 06b1b88b5..0a4d34c5f 100644 --- a/fireflyiii/rootfs/entrypoint.sh +++ b/fireflyiii/rootfs/entrypoint.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv bashio - +#!/bin/bash echo "Starting..." #################### @@ -9,8 +8,8 @@ echo "Starting..." for SCRIPTS in /scripts/*; do [ -e "$SCRIPTS" ] || continue 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 - /./$SCRIPTS || echo "$SCRIPTS: exiting $?" + 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 + /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/fireflyiii_data_importer/rootfs/entrypoint.sh b/fireflyiii_data_importer/rootfs/entrypoint.sh index 06b1b88b5..0a4d34c5f 100644 --- a/fireflyiii_data_importer/rootfs/entrypoint.sh +++ b/fireflyiii_data_importer/rootfs/entrypoint.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv bashio - +#!/bin/bash echo "Starting..." #################### @@ -9,8 +8,8 @@ echo "Starting..." for SCRIPTS in /scripts/*; do [ -e "$SCRIPTS" ] || continue 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 - /./$SCRIPTS || echo "$SCRIPTS: exiting $?" + 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 + /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/flaresolverr/rootfs/entrypoint.sh b/flaresolverr/rootfs/entrypoint.sh index 06b1b88b5..0a4d34c5f 100644 --- a/flaresolverr/rootfs/entrypoint.sh +++ b/flaresolverr/rootfs/entrypoint.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv bashio - +#!/bin/bash echo "Starting..." #################### @@ -9,8 +8,8 @@ echo "Starting..." for SCRIPTS in /scripts/*; do [ -e "$SCRIPTS" ] || continue 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 - /./$SCRIPTS || echo "$SCRIPTS: exiting $?" + 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 + /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/gazpar2mqtt/rootfs/entrypoint.sh b/gazpar2mqtt/rootfs/entrypoint.sh index 06b1b88b5..0a4d34c5f 100644 --- a/gazpar2mqtt/rootfs/entrypoint.sh +++ b/gazpar2mqtt/rootfs/entrypoint.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv bashio - +#!/bin/bash echo "Starting..." #################### @@ -9,8 +8,8 @@ echo "Starting..." for SCRIPTS in /scripts/*; do [ -e "$SCRIPTS" ] || continue 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 - /./$SCRIPTS || echo "$SCRIPTS: exiting $?" + 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 + /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/inadyn/rootfs/entrypoint.sh b/inadyn/rootfs/entrypoint.sh index 06b1b88b5..0a4d34c5f 100644 --- a/inadyn/rootfs/entrypoint.sh +++ b/inadyn/rootfs/entrypoint.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv bashio - +#!/bin/bash echo "Starting..." #################### @@ -9,8 +8,8 @@ echo "Starting..." for SCRIPTS in /scripts/*; do [ -e "$SCRIPTS" ] || continue 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 - /./$SCRIPTS || echo "$SCRIPTS: exiting $?" + 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 + /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/joal/rootfs/entrypoint.sh b/joal/rootfs/entrypoint.sh index 06b1b88b5..0a4d34c5f 100644 --- a/joal/rootfs/entrypoint.sh +++ b/joal/rootfs/entrypoint.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv bashio - +#!/bin/bash echo "Starting..." #################### @@ -9,8 +8,8 @@ echo "Starting..." for SCRIPTS in /scripts/*; do [ -e "$SCRIPTS" ] || continue 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 - /./$SCRIPTS || echo "$SCRIPTS: exiting $?" + 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 + /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/joplin/rootfs/entrypoint.sh b/joplin/rootfs/entrypoint.sh index 06b1b88b5..0a4d34c5f 100644 --- a/joplin/rootfs/entrypoint.sh +++ b/joplin/rootfs/entrypoint.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv bashio - +#!/bin/bash echo "Starting..." #################### @@ -9,8 +8,8 @@ echo "Starting..." for SCRIPTS in /scripts/*; do [ -e "$SCRIPTS" ] || continue 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 - /./$SCRIPTS || echo "$SCRIPTS: exiting $?" + 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 + /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/photoprism/rootfs/entrypoint.sh b/photoprism/rootfs/entrypoint.sh index 06b1b88b5..0a4d34c5f 100644 --- a/photoprism/rootfs/entrypoint.sh +++ b/photoprism/rootfs/entrypoint.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv bashio - +#!/bin/bash echo "Starting..." #################### @@ -9,8 +8,8 @@ echo "Starting..." for SCRIPTS in /scripts/*; do [ -e "$SCRIPTS" ] || continue 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 - /./$SCRIPTS || echo "$SCRIPTS: exiting $?" + 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 + /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done diff --git a/webtrees/rootfs/entrypoint.sh b/webtrees/rootfs/entrypoint.sh index 06b1b88b5..0a4d34c5f 100644 --- a/webtrees/rootfs/entrypoint.sh +++ b/webtrees/rootfs/entrypoint.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv bashio - +#!/bin/bash echo "Starting..." #################### @@ -9,8 +8,8 @@ echo "Starting..." for SCRIPTS in /scripts/*; do [ -e "$SCRIPTS" ] || continue 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 - /./$SCRIPTS || echo "$SCRIPTS: exiting $?" + 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 + /./"$SCRIPTS" || echo "$SCRIPTS: exiting $?" done