Skip to content

Commit 5e55b38

Browse files
committed
Implement dhparam as install file instead generation.
1 parent 31ec1d9 commit 5e55b38

File tree

5 files changed

+34
-48
lines changed

5 files changed

+34
-48
lines changed

install/deb/ssl/dhparam.pem

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-----BEGIN DH PARAMETERS-----
2+
MIICCAKCAgEA+tQGpIebOZgTRfzeJO8V08AKJxjIEPl+ks2s0kVcYEYn7XhoqV9p
3+
vMxYxSz+3gavaKD42tbxbru01MZhi6PAhvWZn1pUgdUFTDPv6Suq/zQuNvxEx/p4
4+
/TvfQ+6IqWcPFjGZb6lmnR4v592joEmTaps6Uqv2PDqCgZoeLDqVSsqWRotFbFWa
5+
mHCFU/5RsSyUAPhuH9lk0UOnK+rkQulppZsAKNLMUBSoNGg+OjYbvcRq8WMQIx8H
6+
Or8i9lZa12UFfr3ui5I7Y29aARh4M8WTtWKAxoDp6N8ENT3hXqgEm4cIVmHOgFDZ
7+
SvWvsV/6ghDpYIOgiatKauQPd2wXkZ/95yeO2JxyYS9rGK4a10QICsB/Jj5j/1i8
8+
yimrllUs5UW8BjmkRTYQPFtvZzrYUoSohSazz7r5Q7/K/Nh40Tb+SgGvQqMxTolL
9+
nTR2kP8DDpTIar/E2B1fDM+yk07hMmKlTOP+nFmJtcq61rM79kQfpsG4mxIX2sxR
10+
el6qP5ng8NQG648aL9OnaUgisLpz1ll6cL7rXHExxEiFgb667F+uKVYJ31d0KyBE
11+
6zrb7iIr5l1q+/vIxIu3QvOfH43+lAV/XHaNP1YvrCkTmkihBAeHt74x5uZRalg3
12+
3qci/XOL0h6i5YW3s7Yem1tqy04P2XYVfmfr4KzzNjOFAQwADKm7G3sCAQI=
13+
-----END DH PARAMETERS-----

install/hst-install-debian.sh

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,21 +1104,8 @@ if [ "$nginx" = 'yes' ]; then
11041104
done
11051105
fi
11061106

1107-
# Generating dhparam.
1108-
echo "(*) Enabling HTTPS Strict Transport Security (HSTS) support,"
1109-
echo -n " this will take some time. Please wait..."
1110-
openssl dhparam 4096 -out /etc/ssl/dhparam.pem > /dev/null 2>&1 &
1111-
BACK_PID=$!
1112-
1113-
# Check if package installation is done, print a spinner
1114-
spin_i=1
1115-
while kill -0 $BACK_PID > /dev/null 2>&1 ; do
1116-
printf "\b${spinner:spin_i++%${#spinner}:1}"
1117-
sleep 0.5
1118-
done
1119-
1120-
# Do a blank echo to get the \n back
1121-
echo
1107+
# Install dhparam.
1108+
cp -f $HESTIA/install/deb/ssl/dhparam.pem /etc/ssl
11221109

11231110
# Update dns servers in nginx.conf
11241111
dns_resolver=$(cat /etc/resolv.conf | grep -i '^nameserver' | cut -d ' ' -f2 | tr '\r\n' ' ' | xargs)

install/hst-install-ubuntu.sh

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,21 +1083,8 @@ if [ "$nginx" = 'yes' ]; then
10831083
done
10841084
fi
10851085

1086-
# Generating dhparam.
1087-
echo "(*) Enabling HTTPS Strict Transport Security (HSTS) support,"
1088-
echo -n " this will take some time. Please wait..."
1089-
openssl dhparam 4096 -out /etc/ssl/dhparam.pem > /dev/null 2>&1 &
1090-
BACK_PID=$!
1091-
1092-
# Check if package installation is done, print a spinner
1093-
spin_i=1
1094-
while kill -0 $BACK_PID > /dev/null 2>&1 ; do
1095-
printf "\b${spinner:spin_i++%${#spinner}:1}"
1096-
sleep 0.5
1097-
done
1098-
1099-
# Do a blank echo to get the \n back
1100-
echo
1086+
# Install dhparam.
1087+
cp -f $HESTIA/install/deb/ssl/dhparam.pem /etc/ssl
11011088

11021089
# Update dns servers in nginx.conf
11031090
dns_resolver=$(cat /etc/resolv.conf | grep -i '^nameserver' | cut -d ' ' -f2 | tr '\r\n' ' ' | xargs)

install/upgrade/0.9.8-29.sh

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,41 @@
11
#!/bin/bash
22

3+
# define vars
4+
HESTIA="/usr/local/hestia"
5+
hestiacp="$HESTIA/install/deb"
6+
37
# load hestia.conf
48
source $HESTIA/conf/hestia.conf
59

10+
# load hestia main functions
11+
source /usr/local/hestia/func/main.sh
12+
613
# Initialize backup directory
714
mkdir -p $HESTIA_BACKUP/templates/
815
mkdir -p $HESTIA_BACKUP/packages/
916

10-
# load hestia main functions
11-
source /usr/local/hestia/func/main.sh
1217

1318
echo "(*) Upgrading to Hestia Control Panel v$VERSION..."
1419

1520
# Generating dhparam.
1621
if [ ! -e /etc/ssl/dhparam.pem ]; then
1722
echo "(*) Enabling HTTPS Strict Transport Security (HSTS) support"
18-
echo -n " This will take some time, please wait..."
19-
openssl dhparam 4096 -out /etc/ssl/dhparam.pem > /dev/null 2>&1 &
20-
BACK_PID=$!
2123

22-
# Check if package installation is done, print a spinner
23-
spin_i=1
24-
while kill -0 $BACK_PID > /dev/null 2>&1 ; do
25-
printf "\b${spinner:spin_i++%${#spinner}:1}"
26-
sleep 0.5
27-
done
24+
# Backup existing conf
25+
mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
2826

29-
# Do a blank echo to get the \n back
30-
echo
27+
# Copy new nginx config
28+
cp -f $hestiacp/nginx/nginx.conf /etc/nginx/
29+
30+
# Copy dhparam
31+
cp -f $hestiacp/ssl/dhparam.pem /etc/ssl/
3132

3233
# Update dns servers in nginx.conf
3334
dns_resolver=$(cat /etc/resolv.conf | grep -i '^nameserver' | cut -d ' ' -f2 | tr '\r\n' ' ' | xargs)
3435
sed -i "s/1.0.0.1 1.1.1.1/$dns_resolver/g" /etc/nginx/nginx.conf
36+
37+
# Restart nginx service
38+
service nginx restart >/dev/null 2>&1
3539
fi
3640

3741
# Update default page templates

upd/add_notifications.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)