#!/bin/bash # BASH script for the listing of Jabberd user accounts # Using an optional username argument results in a dump of the user's XML file # Written by Van Aug-2003 # Change the variables below to reflect your environment: FQDN="im.jabs.org" PATHTOJAB="/usr/local/jabber" cd $PATHTOJAB/spool/$FQDN/ if [ "$1" = "" ] ; then echo "" echo "List of Jabberd user accounts for $FQDN:" echo "==============================================================" echo "" ls -1 *.xml | more echo "" echo "==============================================================" echo "" echo "Total number of accounts = "`ls -1 *.xml | wc -l` echo "" echo "Run 'jablist USERNAME' to see the user's XML file..." echo "" ; elif [ ! -f "$1.xml" ] ; then echo "" echo "User does not exist. Exiting..." echo "" ; else echo "" echo "Contents of file $1.xml:" echo "" more $1.xml echo "" ; fi # End of BASH Script