about summary refs log blame commit diff stats
path: root/bin/rmuser
blob: b2201811dafab65cb5add4ff342e7545297fbb70 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
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"