projects
/
cloudstore.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
working remove-user.sh for extrausers
[cloudstore.git]
/
remove-user.sh
1
#!/bin/sh -xe
2
3
. ./env.sh
4
5
email=$1
6
passwd=/var/lib/extrausers/passwd
7
8
if [ -z "$email" ]; then
9
cat $passwd | cut -d: -f5
10
exit 1
11
fi
12
13
if dir=`grep ":$email:" $passwd | cut -d: -f6` ; then
14
rm -Rfv $dir
15
grep -v ":$email:" $passwd > $passwd.new && mv $passwd.new $passwd
16
fi
17