forked from SimpleHomelab/AtoMiC-ToolKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·201 lines (184 loc) · 5.53 KB
/
setup.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
#!/bin/bash
# Script Name: AtoMiC ToolKit
# Author: htpcBeginner
# Publisher: http://www.htpcBeginner.com
# License: MIT License (refer to README.md for more details)
#
# DO NOT EDIT ANYTHING UNLESS YOU KNOW WHAT YOU ARE DOING.
YELLOW='\e[93m'
RED='\e[91m'
ENDCOLOR='\033[0m'
CYAN='\e[96m'
GREEN='\e[92m'
SCRIPTPATH=$(pwd)
sudo chmod -R 775 * >/dev/null 2>&1
function pause(){
read -p "$*"
}
if [ "$EUID" -ne 0 ]
then
echo
echo -e $RED'Please run as root using the command: '$ENDCOLOR'sudo ./setup.sh'
echo
exit 0
fi
clear
echo
echo -e $RED
echo -e " ┬ ┬┬ ┬┬ ┬ ┬ ┬┌┬┐┌─┐┌─┐┌┐ ┌─┐┌─┐┬┌┐┌┌┐┌┌─┐┬─┐ ┌─┐┌─┐┌┬┐"
echo -e " │││││││││ ├─┤ │ ├─┘│ ├┴┐├┤ │ ┬│││││││├┤ ├┬┘ │ │ ││││"
echo -e " └┴┘└┴┘└┴┘o┴ ┴ ┴ ┴ └─┘└─┘└─┘└─┘┴┘└┘┘└┘└─┘┴└─o└─┘└─┘┴ ┴"
echo -e $CYAN
echo -e " __ ___ "
echo -e " /\ |_ _ |\/|./ | _ _ ||_/.|_ "
echo -e " /--\|_(_)| ||\__ |(_)(_)|| \||_ "
echo
echo -e $GREEN'AtoMiC ToolKit HTPC / Home Server Setup Script'$ENDCOLOR
echo
echo -e 'NOTE: At this point, this script has been confirmed to work only on Ubuntu variants.'
echo
echo -e $YELLOW'00. '$ENDCOLOR'Check and Update AtoMiC ToolKit'
echo -e $YELLOW'01. '$ENDCOLOR'Install .bash_aliases HTPC / Home Server administration'
echo -e $YELLOW'10. '$ENDCOLOR'Sick Beard - Install'
echo -e $YELLOW'11. '$ENDCOLOR'Sick Beard - Uninstall'
echo -e $YELLOW'12. '$ENDCOLOR'Sick Beard - Backup Database and Settings'
echo -e $YELLOW'13. '$ENDCOLOR'Sick Beard - Restore Database and Settings'
echo -e $YELLOW'20. '$ENDCOLOR'SickRage - Install'
echo -e $YELLOW'21. '$ENDCOLOR'SickRage - Uninstall'
echo -e $YELLOW'22. '$ENDCOLOR'SickRage - Backup Database and Settings'
echo -e $YELLOW'23. '$ENDCOLOR'SickRage - Restore Database and Settings'
echo -e $YELLOW'30. '$ENDCOLOR'SickGear - Install'
echo -e $YELLOW'31. '$ENDCOLOR'SickGear - Uninstall'
echo -e $YELLOW'32. '$ENDCOLOR'SickGear - Backup Database and Settings'
echo -e $YELLOW'33. '$ENDCOLOR'SickGear - Restore Database and Settings'
echo -e $YELLOW'40. '$ENDCOLOR'Sonarr (NzbDrone) - Install'
echo -e $YELLOW'41. '$ENDCOLOR'Sonarr (NzbDrone) - Uninstall'
echo -e $YELLOW'50. '$ENDCOLOR'CouchPotato - Install'
echo -e $YELLOW'51. '$ENDCOLOR'CouchPotato - Uninstall'
echo -e $YELLOW'52. '$ENDCOLOR'CouchPotato - Backup Database and Settings'
echo -e $YELLOW'53. '$ENDCOLOR'CouchPotato - Restore Database and Settings'
echo -e $YELLOW'60. '$ENDCOLOR'Transmission - Install (WebUI only, no Desktop GUI)'
echo -e $YELLOW'61. '$ENDCOLOR'Transmission - Uninstall'
echo -e $YELLOW'65. '$ENDCOLOR'qBittorrent - Install (WebUI only, no Desktop GUI)'
echo -e $YELLOW'66. '$ENDCOLOR'qBittorrent - Uninstall'
echo -e $YELLOW'70. '$ENDCOLOR'SABNzbd - Install'
echo -e $YELLOW'71. '$ENDCOLOR'SABNzbd - Uninstall'
echo -e $YELLOW'90. '$ENDCOLOR'HTPC Manager - Install'
echo -e $YELLOW'91. '$ENDCOLOR'HTPC Manager - Uninstall'
echo -e $YELLOW'98. '$ENDCOLOR'See default port numbers, usernames, and passwords'
echo -e $YELLOW'99. '$ENDCOLOR'Exit'
echo
echo -n "What would you like to do [00-99]: "
read option
case $option in
0 | 00)
echo
echo -e $YELLOW'--->Checking for updates...'$ENDCOLOR
git pull
echo
pause 'Press [Enter] to restart and continue...'
cd $SCRIPTPATH
sudo ./setup.sh
exit 0
;;
1 | 01)
sudo ./bash_aliases-installer.sh
;;
10)
sudo ./sickbeard-installer.sh
;;
11)
sudo ./sickbeard-uninstaller.sh
;;
12)
sudo ./sickbeard-backup.sh
;;
13)
sudo ./sickbeard-restore.sh
;;
20)
sudo ./sickrage-installer.sh
;;
21)
sudo ./sickrage-uninstaller.sh
;;
22)
sudo ./sickrage-backup.sh
;;
23)
sudo ./sickrage-restore.sh
;;
30)
sudo ./sickgear-installer.sh
;;
31)
sudo ./sickgear-uninstaller.sh
;;
32)
sudo ./sickgear-backup.sh
;;
33)
sudo ./sickgear-restore.sh
;;
40)
sudo ./sonarr-installer.sh
;;
41)
sudo ./sonarr-uninstaller.sh
;;
50)
sudo ./couchpotato-installer.sh
;;
51)
sudo ./couchpotato-uninstaller.sh
;;
52)
sudo ./couchpotato-backup.sh
;;
53)
sudo ./couchpotato-restore.sh
;;
60)
sudo ./transmission-webui-installer.sh
;;
61)
sudo ./transmission-webui-uninstaller.sh
;;
65)
sudo ./qbittorrent-installer.sh
;;
66)
sudo ./qbittorrent-uninstaller.sh
;;
70)
sudo ./sabnzbd-installer.sh
;;
71)
sudo ./sabnzbd-uninstaller.sh
;;
90)
sudo ./htpcmanager-installer.sh
;;
91)
sudo ./htpcmanager-uninstaller.sh
;;
98)
sudo ./default-credentials.sh
;;
99)
echo 'Exiting...'
echo
echo -e $YELLOW'If this script worked for you, please visit '$CYAN'http://www.htpcBeginner.com'$YELLOW' and like/follow us.'$ENDCOLOR
echo -e $YELLOW'Thank you for using the AtoMiC ToolKit from www.htpcBeginner.com.'$ENDCOLOR
echo
sleep 2
#URL=http://www.htpcbeginner.com/atomic-thanks
#[[ -x $BROWSER ]] && exec "$BROWSER" "$URL"
#path=$(which xdg-open || which gnome-open) && exec "$path" "$URL" >/dev/null 2>&1
;;
*)
echo -e $RED'Invalid Option'$ENDCOLOR
ScriptLoc=$(readlink -f "$0")
sleep 1
exec $ScriptLoc
esac