mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 18:01:03 +01:00
Correct Shebang in scripts
This commit is contained in:
@@ -38,7 +38,7 @@ fi
|
|||||||
mkdir -p /run/s6/container_environment
|
mkdir -p /run/s6/container_environment
|
||||||
|
|
||||||
# Check if shebang exists
|
# Check if shebang exists
|
||||||
for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/usr/bin/bash" "/usr/bin/sh" "/bin/bash" "/bin/sh"; do
|
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
|
||||||
if [ -f "${shebang%% *}" ]; then
|
if [ -f "${shebang%% *}" ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@@ -47,6 +47,12 @@ 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
|
||||||
|
|
||||||
|
# Correct for scripts
|
||||||
|
for files in /etc/cont-init.d/* /etc/services.d/*; do
|
||||||
|
sed -i "s|/command/with-contenv bashio|$shebang|g" "$files"
|
||||||
|
sed -i "s|/usr/bin/with-contenv bashio|$shebang|g" "$files"
|
||||||
|
done
|
||||||
|
|
||||||
# Avoid interference with LOG_LEVEL used in the app
|
# Avoid interference with LOG_LEVEL used in the app
|
||||||
if [ -f /usr/lib/bashio/bashio.sh ]; then
|
if [ -f /usr/lib/bashio/bashio.sh ]; then
|
||||||
sed -i 's|{LOG_LEVEL:|{BASHIO_LOG_LEVEL:|g' /usr/lib/bashio/bashio.sh
|
sed -i 's|{LOG_LEVEL:|{BASHIO_LOG_LEVEL:|g' /usr/lib/bashio/bashio.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user