diff options
author | Jonas Smedegaard <dr@jones.dk> | 2002-02-24 00:11:07 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2002-02-24 00:11:07 +0000 |
commit | 98ba1338688b32ebca53f1e8f3d9691c808d14e1 (patch) | |
tree | 5db88052c46304281922ccfc4ff8be94f0b3cb10 /deluser.local | |
parent | 36e3b7b01bca68c463644cb95ec7f7ddea4d90df (diff) |
adduser.local and deluser.local: Improve support for mailinglists and samba passwords, and add (non-generic) support for environments with dummy/real users.
Diffstat (limited to 'deluser.local')
-rwxr-xr-x | deluser.local | 26 |
1 files changed, 20 insertions, 6 deletions
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 |