daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest Aug 16th, 2018 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top