Skip to content

Commit 7c0e388

Browse files
committed
Added Update script for OpenSSL
1 parent 9d81385 commit 7c0e388

3 files changed

Lines changed: 74 additions & 12 deletions

File tree

scripts/install/openssl/openssl-install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ fi
2626

2727
# Download OpenSSL
2828
cd /usr/src
29-
wget https://www.openssl.org/source/openssl-3.0.1.tar.gz
29+
wget https://www.openssl.org/source/openssl-${OPENSSL_VER}.tar.gz
3030
apt remove openssl -y
31-
tar -xvzf openssl-3.0.1.tar.gz
32-
cd openssl-3.0.1
31+
tar -xvzf openssl-${OPENSSL_VER}.tar.gz
32+
cd openssl-${OPENSSL_VER}
3333

3434
# Compile OpenSSL
3535
chmod +x ./config

scripts/menu/enginescript-menu.sh

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,19 @@ while true
5353
echo ""
5454

5555
PS3='Please enter your choice: '
56-
options=("Configure New Domain" "Security Scanners" "Change EngineScript Install Options" "Update Existing Domain Vhost File" "Update Nginx" "Update PHP" "Update MariaDB" "Update EngineScript" "Update Server Tools" "Exit EngineScript")
56+
options=("Configure New Domain" "Update Domain Vhost File" "Security Scanners" "Change EngineScript Install Options" "Update EngineScript" "Update MariaDB" "Update Nginx" "Update PHP" "Update OpenSSL" "Update Server Tools" "Exit EngineScript")
5757
select opt in "${options[@]}"
5858
do
5959
case $opt in
6060
"Configure New Domain")
6161
/usr/local/bin/enginescript/scripts/install/vhost/vhost-install.sh
6262
break
6363
;;
64+
"Update Domain Vhost File")
65+
echo "Option coming soon"
66+
sleep 3
67+
break
68+
;;
6469
"Security Scanners")
6570
/usr/local/bin/enginescript/scripts/menu/security-tools-menu.sh
6671
break
@@ -69,7 +74,11 @@ while true
6974
nano /home/enginescript-install-options.txt
7075
break
7176
;;
72-
"Update Existing Domain Vhost File")
77+
"Update EngineScript")
78+
/usr/local/bin/enginescript/scripts/update/enginescript-update.sh
79+
break
80+
;;
81+
"Update MariaDB")
7382
echo "Option coming soon"
7483
sleep 3
7584
break
@@ -82,13 +91,8 @@ while true
8291
/usr/local/bin/enginescript/scripts/update/php-8.1-update.sh
8392
break
8493
;;
85-
"Update MariaDB")
86-
echo "Option coming soon"
87-
sleep 3
88-
break
89-
;;
90-
"Update EngineScript")
91-
/usr/local/bin/enginescript/scripts/update/enginescript-update.sh
94+
"Update OpenSSL")
95+
/usr/local/bin/enginescript/scripts/update/openssl-update.sh
9296
break
9397
;;
9498
"Update Server Tools")

scripts/update/opensssl-update.sh

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/usr/bin/env bash
2+
#----------------------------------------------------------------------------
3+
# EngineScript - High-Performance WordPress LEMP Server
4+
#----------------------------------------------------------------------------
5+
# Website: https://EngineScript.com
6+
# GitHub: https://github.com/Enginescript/EngineScript
7+
# Company: VisiStruct / EngineScript
8+
# License: GPL v3.0
9+
# OS: Ubuntu 20.04 (focal)
10+
#----------------------------------------------------------------------------
11+
12+
# EngineScript Variables
13+
source /usr/local/bin/enginescript/enginescript-variables.txt
14+
source /home/EngineScript/enginescript-install-options.txt
15+
16+
# Check current user's ID. If user is not 0 (root), exit.
17+
if [ "${EUID}" != 0 ];
18+
then
19+
echo "${BOLD}ALERT:${NORMAL}"
20+
echo "EngineScript should be executed as the root user."
21+
exit
22+
fi
23+
24+
#----------------------------------------------------------------------------
25+
# Start Main Script
26+
27+
# Download OpenSSL
28+
cd /usr/src
29+
wget https://www.openssl.org/source/openssl-${OPENSSL_VER}.tar.gz
30+
tar -xvzf openssl-${OPENSSL_VER}.tar.gz
31+
cd openssl-${OPENSSL_VER}
32+
33+
# Compile OpenSSL
34+
chmod +x ./config
35+
./Configure
36+
make -j${CPU_COUNT}
37+
#make test
38+
make install
39+
40+
# Link OpenSSL
41+
sudo touch /etc/ld.so.conf.d/openssl.conf
42+
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/openssl.conf
43+
ldconfig
44+
ln -s /usr/local/bin/openssl /usr/bin/
45+
openssl version
46+
47+
# OpenSSL Update Completed
48+
echo ""
49+
echo ""
50+
echo "============================================================="
51+
echo ""
52+
echo "${BOLD}OpenSSL ${OPENSSL_VER} installed.${NORMAL}"
53+
echo ""
54+
echo "============================================================="
55+
echo ""
56+
echo ""
57+
58+
sleep 5

0 commit comments

Comments
 (0)