-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathopenssl-update.sh
More file actions
60 lines (50 loc) · 2.31 KB
/
openssl-update.sh
File metadata and controls
60 lines (50 loc) · 2.31 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
#!/usr/bin/env bash
#----------------------------------------------------------------------------------
# EngineScript - A High-Performance WordPress Server Built on Ubuntu and Cloudflare
#----------------------------------------------------------------------------------
# Website: https://EngineScript.com
# GitHub: https://github.com/Enginescript/EngineScript
# License: GPL v3.0
#----------------------------------------------------------------------------------
# EngineScript Variables
source /usr/local/bin/enginescript/enginescript-variables.txt || { echo "Error: Failed to source /usr/local/bin/enginescript/enginescript-variables.txt" >&2; exit 1; }
source /home/EngineScript/enginescript-install-options.txt || { echo "Error: Failed to source /home/EngineScript/enginescript-install-options.txt" >&2; exit 1; }
# Source shared functions library
source /usr/local/bin/enginescript/scripts/functions/shared/enginescript-common.sh || { echo "Error: Failed to source /usr/local/bin/enginescript/scripts/functions/shared/enginescript-common.sh" >&2; exit 1; }
#----------------------------------------------------------------------------------
# Start Main Script
# Download and extract OpenSSL
download_and_extract \
"https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VER}/openssl-${OPENSSL_VER}.tar.gz" \
"/usr/src/openssl-${OPENSSL_VER}.tar.gz" \
"/usr/src" 2>> /tmp/enginescript_install_errors.log
print_last_errors
debug_pause "OpenSSL Download"
cd "/usr/src/openssl-${OPENSSL_VER}"
# Compile OpenSSL
chmod +x ./config
./Configure 2>> /tmp/enginescript_install_errors.log
make -j"${CPU_COUNT}" 2>> /tmp/enginescript_install_errors.log
#make test
make install 2>> /tmp/enginescript_install_errors.log
print_last_errors
debug_pause "OpenSSL Compilation"
# Link OpenSSL
sudo touch /etc/ld.so.conf.d/openssl.conf
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/openssl.conf
ldconfig 2>> /tmp/enginescript_install_errors.log
ln -s /usr/local/bin/openssl /usr/bin/
openssl version
print_last_errors
debug_pause "OpenSSL Linking"
# OpenSSL Update Completed
echo ""
echo ""
echo "============================================================="
echo ""
echo "${BOLD}OpenSSL ${OPENSSL_VER} installed.${NORMAL}"
echo ""
echo "============================================================="
echo ""
echo ""
sleep 5