blob: 98c697ae9bd08de9c4ffdb71019e9de00b1017d0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh
set -eu
if [ -z "$1" ]; then
printf 'Please pass a user as the first argument.\n'
exit 1
fi
printf 'Removing user %s from the system\n' "$1"
userdel -r -v "$1"
printf 'Cleaning /var/www/users/%s\n' "$1"
rm -rf "/var/www/users/$1"
printf 'Deleting cgit repos\n'
rm -rf "/var/www/cgit_repos/$1"
printf 'Removing httpd config\n'
rm -f "/etc/httpd/$1.conf"
printf 'You need to remove the include line from httpd-vusers.conf and restart httpd\n'
|