mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-30 19:26:07 +02:00
Add check for existing bashio before copy
Check if bashio is already installed before copying.
This commit is contained in:
@@ -16,7 +16,9 @@ if ! bashio::supervisor.ping 2>/dev/null; then
|
|||||||
bashio::log.blue "Version : ${BUILD_VERSION:-1.0}"
|
bashio::log.blue "Version : ${BUILD_VERSION:-1.0}"
|
||||||
bashio::log.blue "Config source: ENV + /data/options.json"
|
bashio::log.blue "Config source: ENV + /data/options.json"
|
||||||
bashio::log.blue '-----------------------------------------------------------'
|
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 |
|
grep -rl "^#!.*bashio" /etc |
|
||||||
while IFS= read -r f; do
|
while IFS= read -r f; do
|
||||||
grep -qF "source /usr/local/lib/bashio-standalone.sh" "$f" && continue
|
grep -qF "source /usr/local/lib/bashio-standalone.sh" "$f" && continue
|
||||||
|
|||||||
Reference in New Issue
Block a user