adguard_home_custom/run.sh aktualisiert
This commit is contained in:
parent
060785e960
commit
179d06a583
@ -1,17 +1,30 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
|
||||
CONFIG_DIR="/addon_config/adguardhome"
|
||||
CONFIG_FILE="$CONFIG_DIR/AdGuardHome.yaml"
|
||||
WORK_DIR="/data/adguardhome"
|
||||
|
||||
# Erstelle Verzeichnis falls nicht existent
|
||||
if [ ! -d "$CONFIG_DIR" ]; then
|
||||
mkdir -p "$CONFIG_DIR"
|
||||
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
|
||||
|
||||
# Symlink für die Konfiguration setzen
|
||||
ln -sfn "$CONFIG_DIR" /opt/adguardhome/conf
|
||||
bashio::log.info "Starte AdGuard Home auf Port 80..."
|
||||
|
||||
echo "Starte AdGuard Home..."
|
||||
/opt/adguardhome/AdGuardHome \
|
||||
-c /opt/adguardhome/conf/AdGuardHome.yaml \
|
||||
-w /opt/adguardhome/work \
|
||||
cd /opt/adguardhome
|
||||
./AdGuardHome \
|
||||
-c "$CONFIG_FILE" \
|
||||
-w "$WORK_DIR" \
|
||||
--no-check-update
|
||||
Loading…
x
Reference in New Issue
Block a user