mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-06 05:58:47 +02:00
Fix shebang test
This commit is contained in:
@@ -44,6 +44,14 @@ for shebang in "/command/with-contenv bashio" "/usr/bin/with-contenv bashio" "/u
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for shebang in "/command/with-contenv bashio" "/usr/bin/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/usr/bin/bash" "/usr/bin/sh" "/bin/bash" "/bin/sh"; do
|
||||||
|
command_path="${shebang%% *}"
|
||||||
|
if [ -x "$command_path" ] && "$command_path" echo "yes" >/dev/null 2>&1; then
|
||||||
|
echo "Valid shebang: $shebang"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# Define shebang
|
# Define shebang
|
||||||
sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh
|
sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user