diff options
author | ahriman <ahriman@falte.red> | 2019-03-13 08:49:32 +0000 |
---|---|---|
committer | ahriman <ahriman@falte.red> | 2019-03-13 08:49:32 +0000 |
commit | 55fdeef0e883f34e80dfca417a81ec57a31c8cda (patch) | |
tree | 61f64032a80eea2e765315866ba151370c88d945 /bin/rmuser | |
download | admin-55fdeef0e883f34e80dfca417a81ec57a31c8cda.tar.gz |
refactor
Diffstat (limited to 'bin/rmuser')
-rwxr-xr-x | bin/rmuser | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/rmuser b/bin/rmuser new file mode 100755 index 0000000..b220181 --- /dev/null +++ b/bin/rmuser @@ -0,0 +1,12 @@ +#!/usr/local/bin/bash + +echo "Removing user $1 from the system" +userdel $1 +echo "Cleaning /home and /var/www/users" +rm -rf /home/$1 +rm -rf /var/www/users/$1 +echo "Removing httpd config" +rm -f /etc/httpd/$1.conf +httpdpid=`pgrep httpd | awk 'NR==1{print $1}'` +kill -HUP $httpdpid +echo "Done! Don't forget to remove the appropriate include line from httpd-vusers.conf" |