Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Run the original gluetun entrypoint in the background
- /gluetun-entrypoint "$@" &
- # Save the PID of the background process
- GLUETUN_PID=$!
- # Log the wait
- echo "$(date '+%Y-%m-%d %H:%M:%S') - Waiting 10 seconds before setting custom DNS..."
- # Wait 10 seconds for gluetun to initialize
- sleep 10
- # Log the DNS change
- echo "$(date '+%Y-%m-%d %H:%M:%S') - Setting custom DNS to 100.xx.xx.xx ..."
- # Set custom DNS from Tailscale if needed
- echo "nameserver 100.xx.xx.xx " > /etc/resolv.conf
- # Log completion
- echo "$(date '+%Y-%m-%d %H:%M:%S') - Custom DNS set successfully!"
- # Wait for the gluetun process to finish
- wait $GLUETUN_PID
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement