#!/bin/bash # BASH script for the removal of a user's jabber account # # Note: If user is still connected when you delete account, # then a small user.xml file will be written when they log out. # They will not be able to login again, but the file will still # be in the accounts directory. Also, even with caching set to # zero, it seems to take a minute or two until the user can't # log back in again. Also...doesn't remove the user from JUD. # # Written by Van Aug-2003 # Change the variables below to reflect your environment: FQDN="im.jabs.org" JABFILE="$1.xml" PATHTOJAB="/usr/local/jabber" echo "" if [ "$1" = "" ] ; then echo "Must specify a user name... (Example: jabdel romeo)" echo "" exit 0 ; fi cd $PATHTOJAB/spool/$FQDN if [ ! -f "$JABFILE" ] ; then echo "User does not exist..." echo "" exit 0 ; fi # Ask for confirmation echo -n "Are you sure you want to delete user $1? Enter 'yes' to confirm: " read CONFIRM echo "" if [ $CONFIRM != "yes" ] ; then echo "Leaving jabdel. No action taken..." echo "" exit 0 ; fi rm -f $PATHTOJAB/spool/$FQDN/$1.xml echo "User $1 deleted..." echo "" # End of BASH script