@@ -34,45 +34,43 @@ if [ ! -f /etc/timezone ]; then
34
34
echo " Etc/UTC" /etc/timezone > sudo
35
35
restart_service rsyslog
36
36
fi
37
-
38
- echo -e " $GREEN <-- Done -->$COL_RESET "
39
37
echo
40
38
41
39
# Add repository
42
- echo -e " $YELLOW => Adding the required repsoitories <= $COL_RESET "
40
+ echo -e " $MAGENTA => Adding the required repsoitories <= $COL_RESET "
43
41
if [ ! -f /usr/bin/add-apt-repository ]; then
42
+ echo
44
43
echo -e " $MAGENTA => Installing add-apt-repository... <= $COL_RESET "
45
- hide_output sudo apt-get -y update
44
+ hide_output sudo apt-get update
46
45
hide_output sudo apt-get -y install software-properties-common
47
46
fi
48
47
echo
49
48
50
49
# PHP 7.3
51
- echo -e " $MAGENTA => Installing Ondrej PHP PPA <= $COL_RESET "
50
+ echo -e " $YELLOW => Installing Ondrej PHP PPA <= $COL_RESET "
52
51
if [ ! -f /etc/apt/sources.list.d/ondrej-php-bionic.list ]; then
53
52
hide_output sudo add-apt-repository -y ppa:ondrej/php
54
53
hide_output sudo apt-get -y update
55
- hide_output sudo apt-get -y install software-properties-common
54
+ echo -e " $GREEN <-- Done -->$COL_RESET "
55
+ # hide_output sudo apt-get -y install software-properties-common
56
56
fi
57
- echo -e " $GREEN <-- Done -->$COL_RESET "
58
57
59
58
# CertBot
60
59
echo
61
- echo -e " $MAGENTA => Installing CertBot PPA <= $COL_RESET "
60
+ echo -e " $YELLOW => Installing CertBot PPA <= $COL_RESET "
62
61
hide_output sudo add-apt-repository -y ppa:certbot/certbot
63
62
hide_output sudo apt-get -y update
64
- echo
65
63
echo -e " $GREEN <-- Done -->$COL_RESET "
66
64
67
65
# MariaDB
68
- echo -e " $MAGENTA => Installing MariaDB <= $COL_RESET "
66
+ echo
67
+ echo -e " $YELLOW => Installing MariaDB <= $COL_RESET "
69
68
hide_output sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
70
69
if [[ (" $DISTRO " == " 18" ) ]]; then
71
70
sudo add-apt-repository ' deb [arch=amd64,arm64,i386,ppc64el] http://mirror.one.com/mariadb/repo/10.4/ubuntu bionic main' > /dev/null 2>&1
72
71
else
73
72
sudo add-apt-repository ' deb [arch=amd64,arm64,ppc64el] http://mirror.one.com/mariadb/repo/10.4/ubuntu xenial main' > /dev/null 2>&1
74
73
fi
75
- echo
76
74
echo -e " $GREEN <-- Done -->$COL_RESET "
77
75
78
76
# Upgrade System Files
@@ -92,16 +90,14 @@ apt_get_quiet dist-upgrade
92
90
93
91
apt_get_quiet autoremove
94
92
95
- echo -e " $GREEN <-- Done -->$COL_RESET "
96
93
echo
97
94
echo -e " $MAGENTA => Installing Base system packages <= $COL_RESET "
98
95
apt_install python3 python3-dev python3-pip \
99
96
wget curl git sudo coreutils bc \
100
97
haveged pollinate unzip \
101
- unattended-upgrades cron ntp fail2ban screen rsyslog
98
+ unattended-upgrades cron ntp fail2ban screen rsyslog lolcat
102
99
103
100
# ### Seed /dev/urandom
104
- echo
105
101
echo -e " $GREEN <-- Done -->$COL_RESET "
106
102
echo
107
103
echo -e " $YELLOW => Initializing system random number generator <= $COL_RESET "
@@ -115,22 +111,44 @@ set +eu +o pipefail
115
111
if [ -z " ${DISABLE_FIREWALL:- } " ]; then
116
112
# Install `ufw` which provides a simple firewall configuration.
117
113
apt_install ufw
118
-
119
- # Allow incoming connections to SSH.
114
+ echo
115
+ echo -e " $YELLOW => Allow incoming connections to SSH <= $COL_RESET "
116
+ echo
117
+ echo -e " $YELLOW ssh port$GREEN OPEN $COL_RESET "
118
+ echo
120
119
ufw_allow ssh
120
+ sleep 0.5
121
+ echo -e " $YELLOW http port$GREEN OPEN $COL_RESET "
122
+ echo
123
+ sleep 0.5
121
124
ufw_allow http
125
+ echo
126
+ sleep 0.5
127
+ echo
122
128
ufw_allow https
129
+
123
130
# ssh might be running on an alternate port. Use sshd -T to dump sshd's #NODOC
124
131
# settings, find the port it is supposedly running on, and open that port #NODOC
125
132
# too. #NODOC
126
133
SSH_PORT=$( sshd -T 2> /dev/null | grep " ^port " | sed " s/port //" ) # NODOC
127
134
if [ ! -z " $SSH_PORT " ]; then
128
135
if [ " $SSH_PORT " != " 22" ]; then
129
136
130
- echo Opening alternate SSH port $SSH_PORT . # NODOC
137
+ echo -e " $YELLOW => Allow incoming connections to SSH <= $COL_RESET "
138
+ echo
139
+ echo -e $" YELLOW Opening alternate SSH port:$GREEN $SSH_PORT $COL_RESET "
140
+ echo
131
141
ufw_allow $SSH_PORT
142
+ sleep 0.5
143
+ echo
144
+ echo -e " $YELLOW http port$GREEN open $COL_RESET "
132
145
ufw_allow http
146
+ sleep 0.5
147
+ echo
148
+ echo -e " $YELLOW https port$GREEN OPEN $COL_RESET "
133
149
ufw_allow https
150
+ sleep 0.5
151
+ echo
134
152
135
153
fi
136
154
fi
209
227
hide_output service nginx restart
210
228
211
229
set +eu +o pipefail
212
- cd $HOME /yiimp_install_script/yiimp_single
230
+ cd $HOME /yiimp_install_script/yiimp_single
0 commit comments