From: hackbard Date: Sun, 14 Dec 2003 00:02:24 +0000 (+0000) Subject: added script to update hdw ip in unrealircd X-Git-Url: https://hackdaworld.org/gitweb/?p=scripts%2Fscripts.git;a=commitdiff_plain;h=e53d651e2f59580fd0c3c658717d8de65ebc3ca9 added script to update hdw ip in unrealircd --- diff --git a/unreal_update.sh b/unreal_update.sh new file mode 100755 index 0000000..9b8527a --- /dev/null +++ b/unreal_update.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# to update ip of hackdaworld.dyndns.org in unrealircd.conf + +CONFIGDIR="/etc/opt/unrealircd" +BINDIR="/opt/unrealircd" +BINARY="ircd" + + +NEWIP="`host hackdaworld.dyndns.org | awk '{ print $4 }'`" + +# HDWTAG dirty ... but easy :) +cat $CONFIGDIR/unrealircd.conf | \ + sed "s/.* HDWTAG .*/hostname $NEWIP \/* HDWTAG *\//" > $CONFDIR/temp +mv $CONFDIR/temp $CONFIGDIR/unrealircd.conf +$BINDIR/$BINARY -rehash +