projects
/
scripts
/
scripts.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
different backups for primary and secondary
[scripts/scripts.git]
/
unreal_update.sh
diff --git
a/unreal_update.sh
b/unreal_update.sh
index
df163aa
..
6c30955
100755
(executable)
--- a/
unreal_update.sh
+++ b/
unreal_update.sh
@@
-9,9
+9,15
@@
BINARY="ircd"
NEWIP="`host hackdaworld.dyndns.org | awk '{ print $4 }'`"
NEWIP="`host hackdaworld.dyndns.org | awk '{ print $4 }'`"
-# HDWTAG dirty ... but easy :)
+# get CURRENTIP
+CURRENTIP="`grep HDWTAG $CONFIGDIR/unrealircd.conf | awk '{ print $2 }'`"
+
+if [ "$CURRENTIP" != "$NEWIP" ]; then
+
cat $CONFIGDIR/unrealircd.conf | \
cat $CONFIGDIR/unrealircd.conf | \
- sed "s/.* HDWTAG .*/hostname
$NEWIP
\/* HDWTAG *\//" > $CONFIGDIR/temp
+ sed "s/.* HDWTAG .*/hostname
::ffff:$NEWIP;
\/* HDWTAG *\//" > $CONFIGDIR/temp
mv $CONFIGDIR/temp $CONFIGDIR/unrealircd.conf
mv $CONFIGDIR/temp $CONFIGDIR/unrealircd.conf
-$BINDIR/$BINARY rehash
+killall -HUP $BINARY
+
+fi