aboutsummaryrefslogtreecommitdiff
path: root/uninstall.sh
blob: 12c18e9a0f3f5be156c8e7645f46222cae09c3da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
usage () {
 echo "You must set a $1 !"
 echo "Usage:"
 echo "    uninstall.sh <user>"
 exit 0
}

if [ -z $1 ]; then
 usage "USER"
fi


USER=$1

sudo systemctl stop kresus-$USER.service
sudo rm /etc/systemd/system/kresus-$USER.service
sudo a2dissite $USER.kresus.neodarz.net.conf
sudo a2dissite $USER.kresus.neodarz.net-le-ssl.conf
sudo rm /etc/apache2/sites-available/$USER.kresus.neodarz.net.conf
sudo rm /etc/apache2/sites-available/$USER.kresus.neodarz.net-le-ssl.conf
sudo systemctl reload apache2.service
sudo rm -r $USER.kresus.neodarz.net