fix: auto-fix linting issues

This commit is contained in:
alexbelgium
2025-06-10 10:06:17 +00:00
committed by github-actions[bot]
parent e5adbd266f
commit f728166b14
197 changed files with 5747 additions and 5714 deletions

View File

@@ -7,9 +7,9 @@ set -e
####################
if [ -f /homeassistant/addons_config/filebrowser/filebrowser.dB ]; then
echo "Moving database to new location /config"
cp -rnf /homeassistant/addons_config/filebrowser/* /config/
rm -r /homeassistant/addons_config/filebrowser
echo "Moving database to new location /config"
cp -rnf /homeassistant/addons_config/filebrowser/* /config/
rm -r /homeassistant/addons_config/filebrowser
fi
######################
@@ -19,24 +19,24 @@ fi
# Clean symlinks
find /config -maxdepth 1 -type l -delete
if [ -d /homeassistant/addons_config ]; then
find /homeassistant/addons_config -maxdepth 1 -type l -delete
find /homeassistant/addons_config -maxdepth 1 -type l -delete
fi
# Remove erroneous folders
if [ -d /homeassistant ]; then
if [ -d /config/addons_config ]; then
rm -r /config/addons_config
fi
if [ -d /config/addons_autoscripts ]; then
rm -r /config/addons_autoscripts
fi
if [ -d /config/addons_config ]; then
rm -r /config/addons_config
fi
if [ -d /config/addons_autoscripts ]; then
rm -r /config/addons_autoscripts
fi
fi
# Create symlinks with legacy folders
if [ -d /homeassistant/addons_config ]; then
ln -s /homeassistant/addons_config /config
find /addon_configs/ -maxdepth 1 -mindepth 1 -type d -not -name "*filebrowser*" -exec ln -s {} /config/addons_config/ \;
ln -s /homeassistant/addons_config /config
find /addon_configs/ -maxdepth 1 -mindepth 1 -type d -not -name "*filebrowser*" -exec ln -s {} /config/addons_config/ \;
fi
if [ -d /homeassistant/addons_autoscripts ]; then
ln -s /homeassistant/addons_autoscripts /config
ln -s /homeassistant/addons_autoscripts /config
fi

View File

@@ -7,14 +7,14 @@ set -e
############
if bashio::config.has_value 'TZ'; then
TIMEZONE=$(bashio::config 'TZ')
bashio::log.info "Setting timezone to $TIMEZONE"
if [ -f /usr/share/zoneinfo/"$TIMEZONE" ]; then
ln -snf /usr/share/zoneinfo/"$TIMEZONE" /etc/localtime
echo "$TIMEZONE" >/etc/timezone
else
bashio::log.fatal "$TIMEZONE not found, are you sure it is a valid timezone?"
fi
TIMEZONE=$(bashio::config 'TZ')
bashio::log.info "Setting timezone to $TIMEZONE"
if [ -f /usr/share/zoneinfo/"$TIMEZONE" ]; then
ln -snf /usr/share/zoneinfo/"$TIMEZONE" /etc/localtime
echo "$TIMEZONE" >/etc/timezone
else
bashio::log.fatal "$TIMEZONE not found, are you sure it is a valid timezone?"
fi
fi
###################
@@ -23,13 +23,13 @@ fi
bashio::config.require.ssl
if bashio::config.true 'ssl'; then
bashio::log.info "ssl enabled. If webui don't work, disable ssl or check your certificate paths"
#set variables
CERTFILE="-t /ssl/$(bashio::config 'certfile')"
KEYFILE="-k /ssl/$(bashio::config 'keyfile')"
bashio::log.info "ssl enabled. If webui don't work, disable ssl or check your certificate paths"
#set variables
CERTFILE="-t /ssl/$(bashio::config 'certfile')"
KEYFILE="-k /ssl/$(bashio::config 'keyfile')"
else
CERTFILE=""
KEYFILE=""
CERTFILE=""
KEYFILE=""
fi
#################
@@ -48,7 +48,7 @@ export FB_BASEURL
declare ADDON_PROTOCOL=http
# Generate Ingress configuration
if bashio::config.true 'ssl'; then
ADDON_PROTOCOL=https
ADDON_PROTOCOL=https
fi
#port=$(bashio::addon.port 80)
@@ -67,41 +67,41 @@ mkdir -p /var/log/nginx && touch /var/log/nginx/error.log
NOAUTH=""
if bashio::config.true 'NoAuth'; then
if ! bashio::fs.file_exists "/data/noauth"; then
rm /data/auth &>/dev/null || true
rm /config/filebrowser.dB &>/dev/null || true
touch /data/noauth
NOAUTH="--noauth"
bashio::log.warning "Auth method change, database reset"
fi
bashio::log.info "NoAuth option selected"
if ! bashio::fs.file_exists "/data/noauth"; then
rm /data/auth &>/dev/null || true
rm /config/filebrowser.dB &>/dev/null || true
touch /data/noauth
NOAUTH="--noauth"
bashio::log.warning "Auth method change, database reset"
fi
bashio::log.info "NoAuth option selected"
else
if ! bashio::fs.file_exists "/data/auth"; then
rm /data/noauth &>/dev/null || true
rm /config/filebrowser.dB &>/dev/null || true
touch /data/auth
bashio::log.warning "Auth method change, database reset"
fi
bashio::log.info "Default username/password : admin/admin"
if ! bashio::fs.file_exists "/data/auth"; then
rm /data/noauth &>/dev/null || true
rm /config/filebrowser.dB &>/dev/null || true
touch /data/auth
bashio::log.warning "Auth method change, database reset"
fi
bashio::log.info "Default username/password : admin/admin"
fi
# Set base folder
if bashio::config.has_value 'base_folder'; then
BASE_FOLDER=$(bashio::config 'base_folder')
BASE_FOLDER=$(bashio::config 'base_folder')
else
BASE_FOLDER=/
BASE_FOLDER=/
fi
# Disable thumbnails
if bashio::config.true 'disable_thumbnails'; then
DISABLE_THUMBNAILS="--disable-thumbnails"
DISABLE_THUMBNAILS="--disable-thumbnails"
else
DISABLE_THUMBNAILS=""
DISABLE_THUMBNAILS=""
fi
# Remove configuration file
if [ -f /.filebrowser.json ]; then
rm /.filebrowser.json
rm /.filebrowser.json
fi
bashio::log.info "Starting..."