diff options
author | Jonas Smedegaard <dr@jones.dk> | 2002-03-28 15:46:58 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2002-03-28 15:46:58 +0000 |
commit | cae7fac7fa8d8f0b4aa35b9d7aaa0c781e43d6ec (patch) | |
tree | c6c79111a3fc0f21e2661bb9a276714d47693fdb /deluser.local | |
parent | 8ba8941303fd6e3a18ba652166b3b98b4b17537a (diff) |
Be as generic in deluser.local as in adduser.local regarding mailinglists.
Diffstat (limited to 'deluser.local')
-rwxr-xr-x | deluser.local | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/deluser.local b/deluser.local index 0dc321b..d74c2e1 100755 --- a/deluser.local +++ b/deluser.local @@ -3,7 +3,7 @@ # /usr/local/sbin/deluser.local # Copyright 2001-2002 Jonas Smedegaard <dr@jones.dk> # -# $Id: deluser.local,v 1.9 2002-03-07 20:33:46 jonas Exp $ +# $Id: deluser.local,v 1.10 2002-03-28 15:46:58 jonas Exp $ # # Common deluser additions for Spiff and Xenux networks # @@ -32,16 +32,17 @@ fi #TODO: Netatalk password # Mailinglists -if [ -x /usr/sbin/remove_members ]; then - if [ -d /var/lib/mailman/lists/users ]; then - /bin/echo $OLDUSERNAME@`/bin/dnsdomainname` \ - | /usr/sbin/remove_members -f - users +#FIXME: Be more generic - support other mailinglists than mailman! +listdir="/var/lib/mailman/lists" +lists="" +[ -d $listdir ] && \ + lists=`find $listdir -type d -mindepth 1 -maxdepth 1 -exec basename '{}' \;` +for list in $lists; do + if [ -d $listdir/$list -a -x /usr/sbin/remove_members ]; then + /bin/echo $NEWUSERNAME@`/bin/dnsdomainname` \ + | /usr/sbin/remove_members -f - $list fi - if [ -d /var/lib/mailman/lists/friends ]; then - /bin/echo $OLDUSERNAME@`/bin/dnsdomainname` \ - | /usr/sbin/remove_members -f - friends - fi -fi +done # Check for dummy shared files if enabled in /etc/local/users.conf if [ -n "$DUMMYSHAREDDIR" ]; then |