-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdoublearruninstall.sh
More file actions
76 lines (64 loc) · 2.5 KB
/
Copy pathdoublearruninstall.sh
File metadata and controls
76 lines (64 loc) · 2.5 KB
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
72
73
74
75
76
#!/bin/bash
# Script by @ComputerByte
# For DoubleARR Uninstalls
# Log to Swizzin.log
export log=/root/logs/swizzin.log
touch $log
_sonarr4kuninstall() {
systemctl disable --now -q sonarr4k
rm /etc/systemd/system/sonarr4k.service
systemctl daemon-reload -q
if [[ -f /install/.nginx.lock ]]; then
rm /etc/nginx/apps/sonarr4k.conf
systemctl reload nginx
fi
rm /install/.sonarr4k.lock
sed -e "s/class sonarr4k_meta://g" -i /opt/swizzin/core/custom/profiles.py
sed -e "s/ name = \"sonarr4k\"//g" -i /opt/swizzin/core/custom/profiles.py
sed -e "s/ pretty_name = \"Sonarr 4K\"//g" -i /opt/swizzin/core/custom/profiles.py
sed -e "s/ baseurl = \"\/sonarr4k\"//g" -i /opt/swizzin/core/custom/profiles.py
sed -e "s/ systemd = \"sonarr4k\"//g" -i /opt/swizzin/core/custom/profiles.py
sed -e "s/ check_theD = True//g" -i /opt/swizzin/core/custom/profiles.py
sed -e "s/ img = \"sonarr\"//g" -i /opt/swizzin/core/custom/profiles.py
sed -e "s/class sonarr_meta(sonarr_meta)://g" -i /opt/swizzin/core/custom/profiles.py
}
_radarr4kuninstall() {
systemctl disable --now -q radarr4k
rm /etc/systemd/system/radarr4k.service
systemctl daemon-reload -q
if [[ -f /install/.nginx.lock ]]; then
rm /etc/nginx/apps/radarr4k.conf
systemctl reload nginx
fi
rm /install/.radarr4k.lock
sed -e "s/class radarr4k_meta://g" -i /opt/swizzin/core/custom/profiles.py
sed -e "s/ name = \"radarr4k\"//g" -i /opt/swizzin/core/custom/profiles.py
sed -e "s/ pretty_name = \"Radarr 4K\"//g" -i /opt/swizzin/core/custom/profiles.py
sed -e "s/ baseurl = \"\/radarr4k\"//g" -i /opt/swizzin/core/custom/profiles.py
sed -e "s/ systemd = \"radarr4k\"//g" -i /opt/swizzin/core/custom/profiles.py
sed -e "s/ check_theD = True//g" -i /opt/swizzin/core/custom/profiles.py
sed -e "s/ img = \"radarr\"//g" -i /opt/swizzin/core/custom/profiles.py
sed -e "s/class radarr_meta(radarr_meta)://g" -i /opt/swizzin/core/custom/profiles.py
}
#Asks if they'd like to uninstall sonarr4k.
if [[ -f /install/.sonarr4k.lock ]]; then
echo -n "Would you like to uninstall sonarr4k?(y/n) "
read -r VAR
if [[ $VAR == 'y' ]]; then
_sonarr4kuninstall
if [[ $VAR == 'n' ]]; then
echo -n We wont touch sonarr4k.
fi
fi
fi
#Asks if they'd like to uninstall radarr4k.
if [[ -f /install/.radarr4k.lock ]]; then
echo -n "Would you like to uninstall radarr4k?(y/n) "
read -r VAR
if [[ $VAR == 'y' ]]; then
_radarr4kuninstall
if [[ $VAR == 'n' ]]; then
echo -n We wont touch radarr4k.
fi
fi
fi