Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions bind/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh

# Start DNS server in background right away
echo '*.ipfs.ipfs.dappnode ipfs.dappnode' > cloaking-rules.txt
/app/dnscrypt-proxy &

pid=$!
Expand Down Expand Up @@ -44,7 +45,9 @@ fi

# Only write to cloaking-rules.txt if both domain and internal_ip are available
if [ -n "$domain" ] && [ -n "$internal_ip" ]; then
echo "$domain $internal_ip" >cloaking-rules.txt
# rewrite cloaking-rules.txt
echo "$domain $internal_ip" > cloaking-rules.txt
echo '*.ipfs.ipfs.dappnode ipfs.dappnode' >> cloaking-rules.txt

kill $pid
wait $pid
Expand All @@ -53,4 +56,4 @@ if [ -n "$domain" ] && [ -n "$internal_ip" ]; then
else
touch cloaking-rules.txt
echo "[ERROR] Missing domain or internal IP. Cloaking rules not updated. Dyndns domain will not be forwarded to internal IP."
fi
fi