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