30 lines
652 B
Bash
30 lines
652 B
Bash
#!/usr/bin/with-contenv bashio
|
|
|
|
CONFIG_DIR="/addon_config/adguardhome"
|
|
CONFIG_FILE="$CONFIG_DIR/AdGuardHome.yaml"
|
|
WORK_DIR="/data/adguardhome"
|
|
|
|
mkdir -p "$CONFIG_DIR"
|
|
mkdir -p "$WORK_DIR"
|
|
|
|
# Falls keine Config da ist, erstelle eine Standard-Config für Ingress
|
|
if [ ! -f "$CONFIG_FILE" ]; then
|
|
bashio::log.info "Erstelle Initial-Konfiguration für Ingress..."
|
|
cat <<EOF > "$CONFIG_FILE"
|
|
http:
|
|
address: 0.0.0.0:80
|
|
session_ttl: 720h
|
|
dns:
|
|
bind_hosts:
|
|
- 0.0.0.0
|
|
port: 53
|
|
EOF
|
|
fi
|
|
|
|
bashio::log.info "Starte AdGuard Home auf Port 80..."
|
|
|
|
cd /opt/adguardhome
|
|
./AdGuardHome \
|
|
-c "$CONFIG_FILE" \
|
|
-w "$WORK_DIR" \
|
|
--no-check-update |