**************************************************************************** * AutoJUD Jabber add-on * Version: 0.3 * Coded By: Stephen Bounds * Contributors: Pat Malone, Roger Smith * Release Date: 26/02/2002 **************************************************************************** ABSTRACT This is a simple Perl script that makes use of the XML-EasyOBJ Perl library to automatically construct a Jabber User Directory that contains a complete list of all registered Jabber users. It is particularly useful for a small company intranet where it is desirable that all entries be regularly maintained and updated. INSTALLATION [NB: If you have downloaded this package as autojud-nolibs, see the PREREQUISITES section. ] To install this package, perform the following steps: (1) vi autojud * modify $jabberdir and $servername as appropriate. * Save autojud. (2) vi Makefile * modify INSTALLDIR to reflect your Jabber installation directory. * Save Makefile. (3) make * this extracts, compiles and installs all Perl modules required for this program. (4) make install * copies autojud, README and LICENSE to your Jabber installation directory under the subdirectory of 'autojud'. (5) make clean * cleans up extracted directories of Perl modules. IF you want autojud to run periodically (eg. every night), modify your cron script as follows when logged on as root: (6) crontab -e * Add a line that looks similar to the following. You will need to replace /home/progs/jabber with your installation directory. (This line runs autojud at midnight every night). 0 0 * * * /home/progs/jabber/autojud/autojud * Save cron (:wq). OPTIONS AutoJUD will terminate the Jabber server for the period of directory building (normally only a few seconds), and automatically restart it on termination. This ensures that directory information is not mangled through two changes being made at once. To prevent this from happening, run 'autojud noterminate' instead. NOTES * AutoJUD is designed to be run as root. However, you can run this as a non-root user if you wish by 'chown' and using the command 'su jabber -c autojud'. * If you do choose to run as not-root, it has been reported that you will need to change the kill signal from SIGINT to SIGKILL for this to work properly. * The Perl packages that are included with AutoJUD will be installed in directories according to your Perl preferences, or the preferences of the packages themselves. I have not modified these in any way. PREREQUISITES For the autojud script to work, Perl 5 must be installed (ideally Perl 5.6.0 or better, along with the following non-default packages: MD5-1.7.tar.gz MIME-Base64-2.12.tar.gz URI-1.18.tar.gz libnet-1.0901.tar.gz HTML-Tagset-3.03.tar.gz HTML-Parser-3.25.tar.gz libwww-perl-5.63.tar.gz XML-RegExp-0.03.tar.gz XML-Parser.2.30.tar.gz XML-DOM-1.36.tar.gz XML-EasyOBJ-1.0.tar.gz If you downloaded the package autojud-nolibs, you will have to obtain each of these packages and install them separately. Installing the packages in the order given should avoid any dependency problems. Do not run 'make' if using the autojud-nolibs package. Modify Makefile to reflect the appropriate INSTALLDIR for jabber, then type 'make install' to copy the files across. CHANGELOG v0.3 - Wrote to a temporary file before overwriting global.xdb. Allowed for vCard syntax other than .... Allowed for missing vCard fields (writes blank entry eg. ). Added extra constants to ease customization for site v0.2 - Added code to remove jabber.pid in case the kill does not happen cleanly. This ensures jabber will restart. ACKNOWLEDGEMENTS I would like to acknowledge the contributions of Pat Malone and Roger Smith towards this version (thanks!). FEEDBACK All feedback is welcomed. You can contact the author on sbounds@start.com.au.