On Tue, Aug 26, 2003 at 11:42:07PM -0700, Paul Johnson wrote:
| I've tried installing the AIM transport from agrogeomatic.educagri.fr
| (from their listing on apt-get.org). Following aim-transport's
| instructions, I added it into the jabber.xml the way it tells you to,
| and I can see it when I query my jabber server, but the aim transport
| does not work.
|
| Has anybody here successfully added transports to jabber? If so, what
| worked for you?
Here's what I did to get aim-t running :
Download the jabber source (apt-get source jabber). Run through a
build so the source tree is "configured".
Download aim-t from http://aim-transport.jabberstudio.org/. Unpack it
and build against the source you obtained earlier. This will give you
aimtrans.so which is binary compatible with your jabberd. Put it
somewhere (I put it in /usr/local/lib/jabber). The key is to get a
.so which will link with your jabberd and not crash. (this is the
issue with using a devel. env. like C)
Also get the windows AIM client of the correct version, in case AOL is
still playing the only-our-client-is-allowed game.
I run aim-t in a separate jabberd process so that if (when! :-() it
crashes it doesn't take down the entire jabber server.
/etc/jabber/jabber.xml :
<jsm>
<browse>
[...]
<service
type="aim"
jid="aim.dman13.dyndns.org"
name="AIM Transport"
>
<ns>jabber:iq:gateway</ns>
<ns>jabber:iq:register</ns>
</service>
</browse>
</jsm>
<service id="aimlinker">
<host>aim.dman13.dyndns.org</host>
<accept>
<ip>127.0.0.1</ip>
<port>5233</port>
<secret>XXX</secret>
</accept>
</service>
I created /etc/jabber/aimtrans.xml to configure the aim-t process and
/etc/jabber/jabber.d/aim-t to start/stop the daemon. Both are
attached because they are kind of long.
I also installed 'restartd' and put the following line in
/etc/restartd.conf :
aimtrans ".*aimtrans.xml" "/etc/jabber/jabber.d/aim-t start"
HTH,
-D
--
All a man's ways seem innocent to him,
but motives are weighed by the Lord.
Proverbs 16:2
http://dman13.dyndns.org/~dman/
#!/bin/bash
#
# Note: this was ripped from /etc/init.d/jabber (version 1.4.2a-10) and
# the 'aimtrans.xml' config file added.
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/jabberd
NAME=jabberd
DESC=jabberd
CONF=/etc/jabber/jabber.xml
PIDFILE=/var/run/jabber/jabber.pid.aim-t
CMDLINE=""
test -f $DAEMON -a -f $CONF || exit 0
# set some parameters like JABBER_HOSTNAME
if test -x /etc/jabber/jabber.cfg; then
. /etc/jabber/jabber.cfg
fi
if [ x"$JABBER_HOSTNAME" != x"" ]; then
CMDLINE="$CMDLINE -h $JABBER_HOSTNAME"
fi
if [ x"$JABBER_SPOOL" != x"" ]; then
CMDLINE="$CMDLINE -s $JABBER_SPOOL"
fi
function manage_pid()
{
TOKILL=$1
if [ -z "$1" ] ; then
echo "Improper function call!"
exit 2
fi
# check for PID file
if [ -f $PIDFILE ]; then
# PID file is there, is it readable?
if [ -r $PIDFILE ]; then
# it's readable, is there a process?
PID=`cat $PIDFILE`
#echo "`ps -p $PID -o ucmd h`"
if [ "$NAME" = "`ps -p$PID -o ucmd h`" ]; then
# looks like it's already running
if [ "$TOKILL" = "kill" ] ; then
kill -TERM $PID
else
echo "$NAME is already running."
exit 1
fi
else
# looks like a stale PID file
rm -f $PIDFILE
fi
else
echo "$PIDFILE file exists, but is not accessible."
exit 1
fi
fi
}
set -e
case "$1" in
start)
manage_pid check
CMDLINE="$CMDLINE -c /etc/jabber/aimtrans.xml"
start-stop-daemon -b -c jabber:daemon --start --quiet \
--pidfile $PIDFILE.aim-t --exec $DAEMON -- $CMDLINE
if pidof $DAEMON > /dev/null; then
echo " aim-t."
else
echo "<Failed>"
fi
;;
stop)
manage_pid kill
;;
esac
<?xml version="1.0" encoding="UTF-8" ?>
<jabber>
<service id="aimlinker">
<uplink/>
<connect>
<ip>127.0.0.1</ip>
<port>5233</port>
<secret>XXX</secret>
</connect>
</service>
<service id="aim.dman13.dyndns.org">
<load>
<aim_transport>/usr/local/lib/jabber/aimtrans.so</aim_transport>
</load>
<aimtrans xmlns='jabber:config:aimtrans'>
<aimbinarydir>/usr/local/lib/jabber/AIM95</aimbinarydir>
<vCard>
<FN>AIM Transport</FN>
<DESC>An AIM Transport!</DESC>
</vCard>
</aimtrans>
</service>
<log id='elogger'>
<host/>
<logtype/>
<format>%d: [%t] (%h): %s</format>
<file>/var/log/jabber/aim-t.error.log</file>
<!--
<stdout/>
-->
</log>
<log id='rlogger'>
<host/>
<logtype>record</logtype>
<format>%d %h %s</format>
<file>/var/log/jabber/aim-t.record.log</file>
<!--
<stdout/>
-->
</log>
<pidfile>/var/run/jabber/jabber.pid.aim-t</pidfile>
</jabber>
<!-- vim: set tw=0 nowrap :-->
Attachment:
pgpEwS4qm2pbO.pgp
Description: PGP signature