forked from eduvpn/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremove_1.0_debian.sh
executable file
·71 lines (61 loc) · 1.93 KB
/
remove_1.0_debian.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/sh
#
# Remove Let's Connect! / eduVPN 1.0 from an existing server...
#
# NOTE:
# - NO backup is made of anything!
# - it is still recommended to "wipe" the VM and start fresh with a 2.0
# deployment!
###############################################################################
# CONFIGURATION
###############################################################################
# Stop and Disable OpenVPN Server Process(es)
for CONFIG_NAME in $(systemctl list-units "openvpn-server@*" --no-legend | cut -d ' ' -f 1)
do
systemctl disable --now "${CONFIG_NAME}"
done
# Remove all OpenVPN Server Configuration(s) and Certificate(s)
rm -rf /etc/openvpn/server/*
systemctl stop apache2
systemctl stop php7.0-fpm
# remove the 1.0 software...
apt-get -y remove \
php-fkooman-otp-verifier \
php-fkooman-oauth2-client \
php-fkooman-oauth2-server \
php-fkooman-yubitwee \
php-fkooman-secookie \
php-fkooman-sqlite-migrate \
php-lc-openvpn-connection-manager \
php-eduvpn-common \
vpn-admin-portal \
vpn-server-api \
vpn-server-node \
vpn-user-portal \
php-saml-ds \
php-json-signer \
vpn-portal-artwork-eduvpn \
vpn-portal-artwork-lc \
php-saml-ds-artwork-eduvpn \
openvpn-plugin-auth-script \
# delete all config
rm -rf "/etc/vpn-user-portal"
rm -rf "/etc/vpn-admin-portal"
rm -rf "/etc/vpn-server-api"
rm -rf "/etc/vpn-server-node"
# delete all data
rm -rf "/var/lib/vpn-user-portal"
rm -rf "/var/lib/vpn-admin-portal"
rm -rf "/var/lib/vpn-server-api"
# delete PHP sessions
rm -rf /var/lib/php/sessions/*
# (old) httpd config snippets
a2disconf vpn-server-api
a2disconf vpn-user-portal
a2disconf vpn-admin-portal
rm -f /etc/apache2/conf-available/vpn-user-portal.conf
rm -f /etc/apache2/conf-available/vpn-admin-portal.conf
rm -f /etc/apache2/conf-available/vpn-server-api.conf
# Delete old repository file(s)
rm -f /etc/apt/sources.list.d/LC.list
rm -f /etc/apt/sources.list.d/eduVPN.list