From 98ba1338688b32ebca53f1e8f3d9691c808d14e1 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 24 Feb 2002 00:11:07 +0000 Subject: adduser.local and deluser.local: Improve support for mailinglists and samba passwords, and add (non-generic) support for environments with dummy/real users. --- deluser.local | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'deluser.local') diff --git a/deluser.local b/deluser.local index b5fd6f9..8277c31 100755 --- a/deluser.local +++ b/deluser.local @@ -13,11 +13,25 @@ test -e /etc/samba/smbpasswd && \ test -x /usr/sbin/remove_members || exit 0 -if [ -x /var/lib/mailman/lists/users ]; then - /bin/echo $OLDUSERNAME@`/bin/dnsdomainname` \ - | /usr/sbin/remove_members -f - users +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 fi -if [ -x /var/lib/mailman/lists/friends ]; then - /bin/echo $OLDUSERNAME@`/bin/dnsdomainname` \ - | /usr/sbin/remove_members -f - friends + if [ -d /var/lib/mailman/lists/friends ]; then + /bin/echo $OLDUSERNAME@`/bin/dnsdomainname` \ + | /usr/sbin/remove_members -f - friends fi +fi + +#FIXME: Make this ALOT more generic! +if [ -d /home/christof/ftp_christof_ro/$1 -a -n "$1" ]; then + echo -n "Remove files at christof (y/N)? " + read -s remove_files + echo + case $remove_files in + y|Y) + rm -rf /home/christof/ftp_christof_ro/$1 + ;; + esac +fi -- cgit v1.2.3