adguard_home_custom/run.sh aktualisiert
This commit is contained in:
parent
d993090642
commit
a014ea5a94
@ -2,14 +2,15 @@
|
||||
|
||||
CONFIG_DIR="/addon_config/adguardhome"
|
||||
CONFIG_FILE="$CONFIG_DIR/AdGuardHome.yaml"
|
||||
# /data ist der persistente interne Speicher des Add-ons
|
||||
WORK_DIR="/data/adguardhome"
|
||||
|
||||
mkdir -p "$CONFIG_DIR"
|
||||
mkdir -p "$WORK_DIR"
|
||||
|
||||
# Falls keine Config da ist, erstelle eine Standard-Config für Ingress
|
||||
# Initial-Config erstellen, falls nicht vorhanden (überspringt Setup Wizard)
|
||||
if [ ! -f "$CONFIG_FILE" ]; then
|
||||
bashio::log.info "Erstelle Initial-Konfiguration für Ingress..."
|
||||
bashio::log.info "Initial-Konfiguration wird erstellt..."
|
||||
cat <<EOF > "$CONFIG_FILE"
|
||||
http:
|
||||
address: 0.0.0.0:80
|
||||
@ -21,10 +22,19 @@ dns:
|
||||
EOF
|
||||
fi
|
||||
|
||||
bashio::log.info "Starte AdGuard Home auf Port 80..."
|
||||
# Pfad-Check: Wo liegt die Binärdatei?
|
||||
if [ -f "/opt/adguardhome/AdGuardHome" ]; then
|
||||
ADGUARD_BIN="/opt/adguardhome/AdGuardHome"
|
||||
elif [ -f "/AdGuardHome" ]; then
|
||||
ADGUARD_BIN="/AdGuardHome"
|
||||
else
|
||||
bashio::log.error "AdGuardHome Binärdatei nicht gefunden!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd /opt/adguardhome
|
||||
./AdGuardHome \
|
||||
bashio::log.info "Starte AdGuard Home von $ADGUARD_BIN..."
|
||||
|
||||
exec "$ADGUARD_BIN" \
|
||||
-c "$CONFIG_FILE" \
|
||||
-w "$WORK_DIR" \
|
||||
--no-check-update
|
||||
Loading…
x
Reference in New Issue
Block a user