mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-26 02:31:51 +02:00
Test shebangs
This commit is contained in:
@@ -28,7 +28,7 @@ for SCRIPTS in /etc/cont-init.d/*; do
|
|||||||
currentshebang="$(sed -n '1{s/^#![[:blank:]]*//p;q}' "$SCRIPTS")"
|
currentshebang="$(sed -n '1{s/^#![[:blank:]]*//p;q}' "$SCRIPTS")"
|
||||||
if [ ! -f "${currentshebang%% *}" ]; then
|
if [ ! -f "${currentshebang%% *}" ]; then
|
||||||
for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do
|
for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do
|
||||||
if [ -f "${shebang%% *}" ]; then
|
if [ -f "${shebang%% *}" ] && [[ "${shebang%% *} echo \"yes\"" ]]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user