forked from JessThrysoee/synology-letsencrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uninstall.sh
39 lines (29 loc) · 783 Bytes
/
uninstall.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
#!/bin/bash
{
uninstall_script() {
local name="$1"
local path="/usr/local/bin/$name"
sudo rm "$path"
printf "uninstalled: %s\n" "$path"
}
uninstall_configuration() {
local path="/usr/local/etc/synology-letsencrypt"
sudo rm -r "$path"
printf "uninstalled configuration: %s\n" "$path"
}
uninstall_cert_message() {
echo ""
echo "Remove any Let's Encrypt certificates from:"
echo " Synology DSM -> Control Panel -> Security -> Certificate"
echo ""
}
uninstall() {
uninstall_script "lego"
uninstall_script "synology-letsencrypt.sh"
uninstall_script "synology-letsencrypt-reload-services.sh"
uninstall_script "synology-letsencrypt-make-cert-id.sh"
uninstall_configuration
uninstall_cert_message
}
uninstall
}