Add check for existing bashio before copy

Check if bashio is already installed before copying.
This commit is contained in:
Alexandre
2026-04-03 09:12:58 +02:00
committed by GitHub
parent 3c4d8118c3
commit 64a31b3d29

View File

@@ -16,7 +16,9 @@ if ! bashio::supervisor.ping 2>/dev/null; then
bashio::log.blue "Version : ${BUILD_VERSION:-1.0}"
bashio::log.blue "Config source: ENV + /data/options.json"
bashio::log.blue '-----------------------------------------------------------'
cp -rf /usr/local/lib/bashio-standalone.sh /usr/bin/bashio
if [ ! -f /usr/bin/bashio ]; then
cp -rf /usr/local/lib/bashio-standalone.sh /usr/bin/bashio
fi
grep -rl "^#!.*bashio" /etc |
while IFS= read -r f; do
grep -qF "source /usr/local/lib/bashio-standalone.sh" "$f" && continue