mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
Github bot : script beautyshied
This commit is contained in:
@@ -8,7 +8,7 @@ mkdir -p /config/addons_autoscripts
|
||||
|
||||
# Migrate scripts
|
||||
if [ -f /config/"${slug}".sh ]; then
|
||||
mv -f /config/"${slug}".sh /config/addons_autoscripts/"${slug}".sh
|
||||
mv -f /config/"${slug}".sh /config/addons_autoscripts/"${slug}".sh
|
||||
fi
|
||||
|
||||
# Execute scripts
|
||||
|
||||
@@ -30,7 +30,7 @@ bashio::log.info "Defining database"
|
||||
|
||||
case $(bashio::config 'database') in
|
||||
|
||||
# Use mariadb
|
||||
# Use mariadb
|
||||
mariadb_addon)
|
||||
bashio::log.info "Using MariaDB addon. Requirements : running MariaDB addon. Discovering values..."
|
||||
if ! bashio::services.available 'mysql'; then
|
||||
@@ -58,7 +58,7 @@ case $(bashio::config 'database') in
|
||||
;;
|
||||
|
||||
|
||||
# Use sqlite
|
||||
# Use sqlite
|
||||
*)
|
||||
bashio::log.info "Using sqlite as database driver"
|
||||
;;
|
||||
|
||||
@@ -24,7 +24,7 @@ change_folders () {
|
||||
|
||||
# Modify files
|
||||
echo "Adapting files"
|
||||
# shellcheck disable=SC2013,SC2086
|
||||
# shellcheck disable=SC2013,SC2086
|
||||
for file in $(grep -ril "$ORIGINALLOCATION" /etc /defaults); do sed -i "s=$ORIGINALLOCATION=$CONFIGLOCATION=g" $file; done
|
||||
|
||||
# Adapt sync.conf
|
||||
|
||||
@@ -9,12 +9,12 @@ if bashio::config.true "expose_collector"; then
|
||||
bashio::log.info "collector.yaml exposed in /share/scrutiny"
|
||||
mkdir -p /share/scrutiny
|
||||
if [ -f /data/config/collector.yaml ] ; then
|
||||
cp -rnf /data/config/collector.yaml /share/scrutiny || true
|
||||
rm -R /data/config/collector.yaml
|
||||
cp -rnf /data/config/collector.yaml /share/scrutiny || true
|
||||
rm -R /data/config/collector.yaml
|
||||
fi
|
||||
if [ -f /opt/scrutiny/config/collector.yaml ] ; then
|
||||
cp -rnf /opt/scrutiny/config/collector.yaml /share/scrutiny || true
|
||||
rm /opt/scrutiny/config/collector.yaml
|
||||
cp -rnf /opt/scrutiny/config/collector.yaml /share/scrutiny || true
|
||||
rm /opt/scrutiny/config/collector.yaml
|
||||
fi
|
||||
touch /share/scrutiny/collector.yaml
|
||||
ln -sf /share/scrutiny/collector.yaml /data/config || true
|
||||
|
||||
@@ -9,12 +9,12 @@ if bashio::config.true "expose_collector"; then
|
||||
bashio::log.info "collector.yaml exposed in /share/scrutiny"
|
||||
mkdir -p /share/scrutiny
|
||||
if [ -f /data/config/collector.yaml ] ; then
|
||||
cp -rnf /data/config/collector.yaml /share/scrutiny || true
|
||||
rm -R /data/config/collector.yaml
|
||||
cp -rnf /data/config/collector.yaml /share/scrutiny || true
|
||||
rm -R /data/config/collector.yaml
|
||||
fi
|
||||
if [ -f /opt/scrutiny/config/collector.yaml ] ; then
|
||||
cp -rnf /opt/scrutiny/config/collector.yaml /share/scrutiny || true
|
||||
rm /opt/scrutiny/config/collector.yaml
|
||||
cp -rnf /opt/scrutiny/config/collector.yaml /share/scrutiny || true
|
||||
rm /opt/scrutiny/config/collector.yaml
|
||||
fi
|
||||
touch /share/scrutiny/collector.yaml
|
||||
ln -sf /share/scrutiny/collector.yaml /data/config || true
|
||||
|
||||
@@ -79,11 +79,11 @@ if bashio::config.true 'ssl'; then
|
||||
|
||||
else
|
||||
|
||||
export HTTPS=false
|
||||
export SSL=false
|
||||
export HTTPS_REDIRECT=false
|
||||
BASE_URL=$(bashio::config 'BASE_URL'):$(bashio::addon.port 80)
|
||||
export BASE_URL="${BASE_URL/https:/http:}"
|
||||
export HTTPS=false
|
||||
export SSL=false
|
||||
export HTTPS_REDIRECT=false
|
||||
BASE_URL=$(bashio::config 'BASE_URL'):$(bashio::addon.port 80)
|
||||
export BASE_URL="${BASE_URL/https:/http:}"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user