Advertisement
Guest User

Untitled

a guest
Jun 6th, 2025
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.65 KB | Source Code | 0 0
  1. #!/bin/sh
  2. # Run the original gluetun entrypoint in the background
  3. /gluetun-entrypoint "$@" &
  4.  
  5. # Save the PID of the background process
  6. GLUETUN_PID=$!
  7.  
  8. # Log the wait
  9. echo "$(date '+%Y-%m-%d %H:%M:%S') - Waiting 10 seconds before setting custom DNS..."
  10.  
  11. # Wait 10 seconds for gluetun to initialize
  12. sleep 10
  13.  
  14. # Log the DNS change
  15. echo "$(date '+%Y-%m-%d %H:%M:%S') - Setting custom DNS to 100.xx.xx.xx ..."
  16.  
  17. # Set custom DNS from Tailscale if needed
  18. echo "nameserver 100.xx.xx.xx " > /etc/resolv.conf
  19.  
  20. # Log completion
  21. echo "$(date '+%Y-%m-%d %H:%M:%S') - Custom DNS set successfully!"
  22.  
  23. # Wait for the gluetun process to finish
  24. wait $GLUETUN_PID
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement