-
Notifications
You must be signed in to change notification settings - Fork 8
/
install
executable file
·165 lines (139 loc) · 4.15 KB
/
install
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
#!/bin/bash
# Stalker WM Portal road warrior installer for Debian, Ubuntu
# This script will work on Debian, Ubuntu and probably other distros
# of the same families, although no support is offered for them. It isn't
# bulletproof but it will probably work if you simply want to setup a Stalker WM Portal on
# your Debian/Ubuntu box. It has been designed to be as unobtrusive and
# universal as possible.
# This is a free shell script under GNU GPL version 3.0 or above
# Copyright (C) 2017 LinuxHelps project.
# Feedback/comment/suggestions : https://linuxhelps.net/
# Author Ivan Bachvarov a.k.a SlaSerX
#Let's Encrypt Repository
#apt install software-properties-common -y
#yes | add-apt-repository ppa:certbot/certbot
clear;
# clear;
# Reset
Reset='\e[0m' # Text Reset
# Regular Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
Yellow='\e[0;33m' # Yellow
Blue='\e[0;34m' # Blue
Purple='\e[0;35m' # Purple
Cyan='\e[0;36m' # Cyan
White='\e[0;37m' # White
# Bold
BBlack='\e[1;30m' # Black
BRed='\e[1;31m' # Red
BGreen='\e[1;32m' # Green
BYellow='\e[1;33m' # Yellow
BBlue='\e[1;34m' # Blue
BPurple='\e[1;35m' # Purple
BCyan='\e[1;36m' # Cyan
BWhite='\e[1;37m' # White
echo -ne "${BGreen}Welcome to Ministra auto install script By SlaSerX | Modified by Snake24564\n
${BRed}Warning: This install script will remove your existing apache2 and its configuration in instead of it install nginx.${Reset}\n
${BWhite}Do you want continue (y/n):${Reset} ";
read AGREE
if [ "$AGREE" != "y" ]; then
echo -ne "${BWhite}Exiting... ${Reset}\n";
exit;
fi
# Tweak nameservers
echo "nameserver 8.8.8.8" > /etc/resolv.conf
# SET LOCALE TO UTF-8
function setLocale {
echo -ne "${BCyan}Setting locales...${Reset}"
locale-gen en_US.UTF-8 >> /dev/null 2>&1
export LANG="en_US.UTF-8" >> /dev/null 2>&1
echo -e "${BGreen}\t\t\t\tDone.${Reset}"
}
# TWEAK SYSTEM VALUES
function tweakSystem {
echo -ne "${BCyan}Tweaking system...${Reset}"
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "fs.file-max = 327680" >> /etc/sysctl.conf
echo "kern.maxfiles = 327680" >> /etc/sysctl.conf
echo "kern.maxfilesperproc = 327680" >> /etc/sysctl.conf
echo "kernel.core_uses_pid = 1" >> /etc/sysctl.conf
echo "kernel.core_pattern = /var/crash/core-%e-%s-%u-%g-%p-%t" >> /etc/sysctl.conf
echo "fs.suid_dumpable = 2" >> /etc/sysctl.conf
sysctl -p >> /dev/null 2>&1
echo -e "${BGreen}\t\t\t\tDone.${Reset}"
}
setLocale;
tweakSystem;
#Update and Upgrade
echo "Updating and Upgrading"
apt-get update && apt-get upgrade -y
# Setting for the new UTF-8 terminal support in Lion
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
apt-get install -y dialog wget curl nano sudo unzip sl ccze lolcat software-properties-common aview
chmod +x ./lab/*
(
c=20
while [ $c -ne 120 ]
do
echo $c
echo "###"
echo "$c %"
echo "###"
((c+=20))
sleep 1
done
) |
dialog --title "Installation will begin shortly" --gauge "Please wait ...." 10 60 0
if [[ $EUID -ne 0 ]]; then
echo "⚠️ This script must be run as root ⚠️ "
exit 1
else
cmd=(dialog --separate-output --checklist "Please Select Software you want to install:" 22 76 16)
options=(1 "Install Ministra Portal" off # any option can be set to default to "on"
2 "Install Stalker Portal" off
3 "Install Ministra on Ubuntu 16.04" off
4 "Install Ministra on Debian 8" off
5 "Install of the Storage Server" off
6 "Exit" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
for choice in $choices
do
case $choice in
1)
#Install Ministra*
echo "Installing Ministra"
./lab/ministra
;;
2)
#Install Stalker
echo "Installing Stalker"
./lab/disabled
;;
3)
#Install Ubuntu 16.04
echo "Install Ministra on Ubuntu 16.04"
./lab/ubuntu16
;;
4)
#Install Ubuntu 16.04
echo "Install Ministra on Debian 8"
./lab/debian
;;
5)
# Install of the Storage Server
echo "Install of the Storage Server"
./lab/storage
;;
#Exit
6)
exit
;;
esac
done
fi