3 # to update ip of hackdaworld.dyndns.org in unrealircd.conf
5 CONFIGDIR="/etc/opt/unrealircd"
6 BINDIR="/opt/unrealircd/bin"
10 NEWIP="`host hackdaworld.dyndns.org | awk '{ print $4 }'`"
13 CURRENTIP="`grep HDWTAG $CONFIGDIR/unrealircd.conf | awk '{ print $2 }'`"
15 if [ "$CURRENTIP" != "$NEWIP" ]; then
17 cat $CONFIGDIR/unrealircd.conf | \
18 sed "s/.* HDWTAG .*/hostname ::ffff:$NEWIP; \/* HDWTAG *\//" > $CONFIGDIR/temp
19 mv $CONFIGDIR/temp $CONFIGDIR/unrealircd.conf