Guest User

Untitled

a guest
Aug 16th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!/bin/sh
  2. # Configuration
  3. DYNDNS="marc-schiller.ath.cx"
  4. HOST="67.215.3.94"
  5. SPORT="15785"
  6. DPORT="16001"
  7. PIDFILE="/home/rproxy/fproxy.pid"
  8. LOG="/dev/null"
  9. ELOG="/home/rproxy/err.log"
  10.  
  11. # Change nothing after here
  12. OLDIP=$(cat ip.old)
  13. NEWIP=$(host $DYNDNS | awk '{ print $3 }')
  14. PROXYPID=$(cat $PIDFILE)
  15.  
  16. #ip abgleich
  17. if [ "$OLDIP" != "$NEWIP" ]; then
  18. kill $PROXYPID
  19. echo $NEWIP > ip.old
  20. ./fproxy $HOST:$SPORT -- $NEWIP:$DPORT -o$LOG -e$ELOG -p$PIDFILE
  21. fi
Add Comment
Please, Sign In to add comment