ll
script
Download, Add a comment, Back to main page
#!/bin/sh
#
# With this script you can update services like ll.l4l.be (this lists servers in the Flanders and the
# Netherlands) with new servers. This script requires Jabberd-1.4.x but you also can use Jabberd-1.4.x with
# other server implementations just like you do with transports. Be aware that you need to split the config
# file of the service and point to brows.xml; you can do this with <jabberd:include>./browse.xml</jabberd:include>
# (similar script for ejabberd that do not needs Jabberd-1.4.x is planned)
#
# Copyright (C) 2004, Sander Devrieze <s.devrieze@pandora.be>
# License: You may do with this script what you want. But I'm not responsible for any problems with it.
TMP=/tmp/ll
LL_DIR=/home/ejabberd/etc/jabber/lage_landen/ # Directory with the config files of the ll service.
INIT=/home/ejabberd/etc/init.d/services/ll # Location of the init script of the ll service.
#######
quit () {
rm -rf $TMP
exit
}
mkdir $TMP
wget http://jabber.l4l.be/download/servers -O $TMP/servers
echo " <browse>
<!-- Put here the comment you want in the file browse.xml -->" > $TMP/browse.xml
for i in `/bin/cat $TMP/servers`; do
echo " <item category=\"service\" type=\"jabber\"
jid=\"$i\" name=\"$i\"/>" >> $TMP/browse.xml
done
echo " </browse>" >> $TMP/browse.xml
cat /tmp/ll/browse.xml
echo "Do you want to continu?"
OPTIONS="Yes No"
select opt in $OPTIONS; do
if [ $opt = "Yes" ]; then
cp $TMP/browse.xml $LL_DIR/browse.xml
$INIT restart
quit
elif [ $opt = "No" ]; then
echo "Updating abrupted; changes not applied."
quit
else
clear
echo bad option
fi
done