added script to update hdw ip in unrealircd
authorhackbard <hackbard>
Sun, 14 Dec 2003 00:02:24 +0000 (00:02 +0000)
committerhackbard <hackbard>
Sun, 14 Dec 2003 00:02:24 +0000 (00:02 +0000)
unreal_update.sh [new file with mode: 0755]

diff --git a/unreal_update.sh b/unreal_update.sh
new file mode 100755 (executable)
index 0000000..9b8527a
--- /dev/null
@@ -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
+