mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
fix: auto-fix linting issues
This commit is contained in:
committed by
github-actions[bot]
parent
e5adbd266f
commit
f728166b14
@@ -12,23 +12,23 @@ PUID="${PUID:-0}"
|
||||
PGID="${PGID:-0}"
|
||||
|
||||
if [ -f /ha_entrypoint.sh ]; then
|
||||
chown -R "$PUID:$PGID" /ha_entrypoint.sh
|
||||
chmod -R 755 /ha_entrypoint.sh
|
||||
chown -R "$PUID:$PGID" /ha_entrypoint.sh
|
||||
chmod -R 755 /ha_entrypoint.sh
|
||||
fi
|
||||
|
||||
if [ -d /etc/cont-init.d ]; then
|
||||
chown -R "$PUID:$PGID" /etc/cont-init.d
|
||||
chmod -R 755 /etc/cont-init.d
|
||||
chown -R "$PUID:$PGID" /etc/cont-init.d
|
||||
chmod -R 755 /etc/cont-init.d
|
||||
fi
|
||||
|
||||
if [ -d /etc/services.d ]; then
|
||||
chown -R "$PUID:$PGID" /etc/services.d
|
||||
chmod -R 755 /etc/services.d
|
||||
chown -R "$PUID:$PGID" /etc/services.d
|
||||
chmod -R 755 /etc/services.d
|
||||
fi
|
||||
|
||||
if [ -d /etc/s6-rc.d ]; then
|
||||
chown -R "$PUID:$PGID" /etc/s6-rc.d
|
||||
chmod -R 755 /etc/s6-rc.d
|
||||
chown -R "$PUID:$PGID" /etc/s6-rc.d
|
||||
chmod -R 755 /etc/s6-rc.d
|
||||
fi
|
||||
|
||||
# Correct shebang in entrypoint
|
||||
@@ -39,11 +39,11 @@ mkdir -p /run/s6/container_environment
|
||||
|
||||
# Check if shebang exists
|
||||
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
|
||||
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
|
||||
@@ -51,12 +51,12 @@ sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh
|
||||
|
||||
# Correct for scripts
|
||||
for string in "/command/with-contenv bashio" "/usr/bin/with-contenv bashio"; do
|
||||
grep -sril "$string" /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d | while read -r files; do
|
||||
sed -i "s|$string|$shebang|g" "$files"
|
||||
done
|
||||
grep -sril "$string" /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d | while read -r files; do
|
||||
sed -i "s|$string|$shebang|g" "$files"
|
||||
done
|
||||
done
|
||||
|
||||
# Avoid interference with LOG_LEVEL used in the app
|
||||
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
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user