fix: auto-fix linting issues

This commit is contained in:
alexbelgium
2025-07-23 08:58:09 +00:00
committed by github-actions[bot]
parent 3539f328fb
commit f5428e0950
224 changed files with 5663 additions and 5662 deletions

0
portainer/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

62
portainer/rootfs/etc/services.d/portainer/run Normal file → Executable file
View File

@@ -19,12 +19,12 @@ options+=(--host unix:///var/run/docker.sock)
bashio::config.require.ssl
if bashio::config.true 'ssl'; then
bashio::log.info "SSL enabled. If web UI doesn't work, disable SSL or check your certificate paths."
CERTFILE="$(bashio::config 'certfile')"
KEYFILE="$(bashio::config 'keyfile')"
options+=(--sslcert /ssl/"$CERTFILE")
options+=(--sslkey /ssl/"$KEYFILE")
bashio::log.info "... SSL activated."
bashio::log.info "SSL enabled. If web UI doesn't work, disable SSL or check your certificate paths."
CERTFILE="$(bashio::config 'certfile')"
KEYFILE="$(bashio::config 'keyfile')"
options+=(--sslcert /ssl/"$CERTFILE")
options+=(--sslkey /ssl/"$KEYFILE")
bashio::log.info "... SSL activated."
fi
################
@@ -35,9 +35,9 @@ fi
PASSWORD_FILE="/data/portainer_password"
HIDDEN_FILE="/data/hidden"
if ! bashio::config.has_value 'password'; then
PASSWORD="empty"
PASSWORD="empty"
else
PASSWORD="$(bashio::config 'password')"
PASSWORD="$(bashio::config 'password')"
fi
# Check current password
@@ -47,23 +47,23 @@ CURRENTPASSWORD="$(cat "$PASSWORD_FILE")"
# Reset password if not first run
if bashio::fs.file_exists "$HIDDEN_FILE"; then
if [[ "$CURRENTPASSWORD" != "$PASSWORD" ]]; then
BACKUPLOCATION="/share/portainer_$(date +%m-%d-%Y)_$RANDOM.backup"
mv -f /data/portainer.db "$BACKUPLOCATION" || true
rm "$HIDDEN_FILE" || true
bashio::log.warning "... password changed, database reset. Previous version stored in $BACKUPLOCATION"
fi
if [[ "$CURRENTPASSWORD" != "$PASSWORD" ]]; then
BACKUPLOCATION="/share/portainer_$(date +%m-%d-%Y)_$RANDOM.backup"
mv -f /data/portainer.db "$BACKUPLOCATION" || true
rm "$HIDDEN_FILE" || true
bashio::log.warning "... password changed, database reset. Previous version stored in $BACKUPLOCATION"
fi
fi
# Define option
echo -n "$PASSWORD" > "$PASSWORD_FILE"
if [[ "$PASSWORD" = "empty" ]]; then
bashio::log.info "... starting without predefined password."
bashio::log.warning "If this is your first boot, you have a 5 minutes time period to perform the initial set-up."
bashio::log.warning "If you don't do it, you would be faced with a 404 error and will need to restart the add-on to access the set-up page."
bashio::log.info "... starting without predefined password."
bashio::log.warning "If this is your first boot, you have a 5 minutes time period to perform the initial set-up."
bashio::log.warning "If you don't do it, you would be faced with a 404 error and will need to restart the add-on to access the set-up page."
else
options+=(--admin-password-file "$PASSWORD_FILE")
bashio::log.info "... password set according to add-on options."
options+=(--admin-password-file "$PASSWORD_FILE")
bashio::log.info "... password set according to add-on options."
fi
###################
@@ -72,18 +72,18 @@ fi
# Hide Hassio containers by default, but only enforce on first run
if ! bashio::fs.file_exists "$HIDDEN_FILE"; then
options+=(--hide-label io.hass.type=supervisor)
options+=(--hide-label io.hass.type=homeassistant)
options+=(--hide-label io.hass.type=base)
options+=(--hide-label io.hass.type=core)
# options+=(--hide-label io.hass.type=addon)
options+=(--hide-label io.hass.type=audio)
options+=(--hide-label io.hass.type=cli)
options+=(--hide-label io.hass.type=dns)
options+=(--hide-label io.hass.type=multicast)
options+=(--hide-label io.hass.type=observer)
bashio::log.info "... non-addon containers hidden."
touch "$HIDDEN_FILE"
options+=(--hide-label io.hass.type=supervisor)
options+=(--hide-label io.hass.type=homeassistant)
options+=(--hide-label io.hass.type=base)
options+=(--hide-label io.hass.type=core)
# options+=(--hide-label io.hass.type=addon)
options+=(--hide-label io.hass.type=audio)
options+=(--hide-label io.hass.type=cli)
options+=(--hide-label io.hass.type=dns)
options+=(--hide-label io.hass.type=multicast)
options+=(--hide-label io.hass.type=observer)
bashio::log.info "... non-addon containers hidden."
touch "$HIDDEN_FILE"
fi
####################