projects
/
scripts
/
scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e318a0c
)
only process if ip changed
author
hackbard
<hackbard>
Sun, 14 Dec 2003 01:00:35 +0000
(
01:00
+0000)
committer
hackbard
<hackbard>
Sun, 14 Dec 2003 01:00:35 +0000
(
01:00
+0000)
unreal_update.sh
patch
|
blob
|
history
diff --git
a/unreal_update.sh
b/unreal_update.sh
index
876484c
..
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 | \
sed "s/.* HDWTAG .*/hostname ::ffff:$NEWIP; \/* HDWTAG *\//" > $CONFIGDIR/temp
mv $CONFIGDIR/temp $CONFIGDIR/unrealircd.conf
killall -HUP $BINARY
cat $CONFIGDIR/unrealircd.conf | \
sed "s/.* HDWTAG .*/hostname ::ffff:$NEWIP; \/* HDWTAG *\//" > $CONFIGDIR/temp
mv $CONFIGDIR/temp $CONFIGDIR/unrealircd.conf
killall -HUP $BINARY
+fi
+