mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-14 19:41:31 +02:00
Update ha_lsio.sh
This commit is contained in:
@@ -31,12 +31,14 @@ for file in $(grep -Esril "/config[ '\"/]|/config\$" /etc /defaults); do
|
|||||||
sed -Ei "s=(/config)+(/| |$|\"|\')=$CONFIGLOCATION\2=g" "$file"
|
sed -Ei "s=(/config)+(/| |$|\"|\')=$CONFIGLOCATION\2=g" "$file"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Avoid chmod /config
|
# Avoid chmod /config if ha config mounted
|
||||||
for file in /etc/services.d/*/* /etc/cont-init.d/* /etc/s6-overlay/s6-rc.d/*/*; do
|
if [ -f /config/configuration.yaml ] || [ -f /config/configuration.json ]; then
|
||||||
if [ -f "$file" ] && [ ! -z "$(awk '/chown.*abc:abc.*\\/,/.*\/config( |$)/{print FILENAME}' "$file")" ]; then
|
for file in /etc/services.d/*/* /etc/cont-init.d/* /etc/s6-overlay/s6-rc.d/*/*; do
|
||||||
sed -i "s|/config$|/data|g" "$file"
|
if [ -f "$file" ] && [ ! -z "$(awk '/chown.*abc:abc.*\\/,/.*\/config( |$)/{print FILENAME}' "$file")" ]; then
|
||||||
fi
|
sed -i "s|/config$|/data|g" "$file"
|
||||||
done
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Send crond logs to addon logs
|
# Send crond logs to addon logs
|
||||||
if [ -f /etc/s6-overlay/s6-rc.d/svc-cron/run ]; then
|
if [ -f /etc/s6-overlay/s6-rc.d/svc-cron/run ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user