Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Configuration
- DYNDNS="marc-schiller.ath.cx"
- HOST="67.215.3.94"
- SPORT="15785"
- DPORT="16001"
- PIDFILE="/home/rproxy/fproxy.pid"
- LOG="/dev/null"
- ELOG="/home/rproxy/err.log"
- # Change nothing after here
- OLDIP=$(cat ip.old)
- NEWIP=$(host $DYNDNS | awk '{ print $3 }')
- PROXYPID=$(cat $PIDFILE)
- #ip abgleich
- if [ "$OLDIP" != "$NEWIP" ]; then
- kill $PROXYPID
- echo $NEWIP > ip.old
- ./fproxy $HOST:$SPORT -- $NEWIP:$DPORT -o$LOG -e$ELOG -p$PIDFILE
- fi
Add Comment
Please, Sign In to add comment