Skip to content

Commit 93e3e57

Browse files
author
Kristan Kenney
committed
Bump to version 1.1.1
1 parent 5d87c40 commit 93e3e57

File tree

5 files changed

+228
-221
lines changed

5 files changed

+228
-221
lines changed

install/hst-install-debian.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ echo ' | _ | __/\__ \ |_| | (_| | |___| __/ '
437437
echo ' |_| |_|\___||___/\__|_|\__,_|\____|_| '
438438
echo
439439
echo ' Hestia Control Panel'
440-
echo ' v1.1.0'
440+
echo ' v1.1.1'
441441
echo -e "\n"
442442
echo "===================================================================="
443443
echo -e "\n"

install/hst-install-ubuntu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ echo ' | _ | __/\__ \ |_| | (_| | |___| __/ '
399399
echo ' |_| |_|\___||___/\__|_|\__,_|\____|_| '
400400
echo
401401
echo ' Hestia Control Panel'
402-
echo ' v1.1.0'
402+
echo ' v1.1.1'
403403
echo -e "\n"
404404
echo "===================================================================="
405405
echo -e "\n"

install/upgrade/versions/latest.sh

Lines changed: 1 addition & 218 deletions
Original file line numberDiff line numberDiff line change
@@ -1,224 +1,7 @@
11
#!/bin/sh
22

3-
# Hestia Control Panel upgrade script for target version 1.1.0
3+
# Hestia Control Panel upgrade script for target version 1.1.1
44

55
#######################################################################################
66
####### Place additional commands below. #######
77
#######################################################################################
8-
9-
# Set default theme
10-
if [ -z $THEME ]; then
11-
echo "(*) Enabling support for themes..."
12-
$BIN/v-change-sys-theme 'default'
13-
fi
14-
15-
# Reduce SSH login grace time
16-
if [ -e /etc/ssh/sshd_config ]; then
17-
echo "(*) Hardening SSH daemon configuration..."
18-
sed -i "s/LoginGraceTime 2m/LoginGraceTime 1m/g" /etc/ssh/sshd_config
19-
sed -i "s/#LoginGraceTime 2m/LoginGraceTime 1m/g" /etc/ssh/sshd_config
20-
fi
21-
22-
# Implement recidive jail for fail2ban
23-
if [ ! -z "$FIREWALL_EXTENSION" ]; then
24-
if ! cat /etc/fail2ban/jail.local | grep -q "\[recidive\]"; then
25-
echo -e "\n\n[recidive]\nenabled = true\nfilter = recidive\naction = hestia[name=HESTIA]\nlogpath = /var/log/fail2ban.log\nmaxretry = 3\nfindtime = 86400\nbantime = 864000" >> /etc/fail2ban/jail.local
26-
fi
27-
fi
28-
29-
# Enable OCSP SSL stapling and harden nginx configuration for roundcube
30-
if [ ! -z "$IMAP_SYSTEM" ]; then
31-
echo "(*) Hardening security of Roundcube webmail..."
32-
$BIN/v-update-mail-templates > /dev/null 2>&1
33-
if [ -e /etc/nginx/conf.d/webmail.inc ]; then
34-
cp -f /etc/nginx/conf.d/webmail.inc $HESTIA_BACKUP/conf/
35-
sed -i "s/config|temp|logs/README.md|config|temp|logs|bin|SQL|INSTALL|LICENSE|CHANGELOG|UPGRADING/g" /etc/nginx/conf.d/webmail.inc
36-
fi
37-
fi
38-
39-
# Fix restart queue
40-
if [ -z "$($BIN/v-list-cron-jobs admin | grep 'v-update-sys-queue restart')" ]; then
41-
command="sudo $BIN/v-update-sys-queue restart"
42-
$BIN/v-add-cron-job 'admin' '*/2' '*' '*' '*' '*' "$command"
43-
fi
44-
45-
# Remove deprecated line from ClamAV configuration file
46-
if [ -e "/etc/clamav/clamd.conf" ]; then
47-
clamd_conf_update_check=$(grep DetectBrokenExecutables /etc/clamav/clamd.conf)
48-
if [ ! -z "$clamd_conf_update_check" ]; then
49-
echo "(*) Updating ClamAV configuration..."
50-
sed -i '/DetectBrokenExecutables/d' /etc/clamav/clamd.conf
51-
fi
52-
fi
53-
54-
# Remove errornous history.log file created by certain builds due to bug in v-restart-system
55-
if [ -e $HESTIA/data/users/history.log ]; then
56-
rm -f $HESTIA/data/users/history.log
57-
fi
58-
59-
# Use exim4 server hostname instead of mail domain and remove hardcoded mail prefix
60-
if [ ! -z "$MAIL_SYSTEM" ]; then
61-
echo "(*) Updating exim configuration..."
62-
if cat /etc/exim4/exim4.conf.template | grep -q 'helo_data = mail.${sender_address_domain}'; then
63-
sed -i 's/helo_data = mail.${sender_address_domain}/helo_data = ${primary_hostname}/g' /etc/exim4/exim4.conf.template
64-
fi
65-
if ! grep -q '^OUTGOING_IP = /' /etc/exim4/exim4.conf.template; then
66-
sed -i '/^OUTGOING_IP/d' /etc/exim4/exim4.conf.template
67-
sed -i 's|^begin acl|OUTGOING_IP = /etc/exim4/domains/$sender_address_domain/ip\nbegin acl|' /etc/exim4/exim4.conf.template
68-
fi
69-
if ! grep -q 'interface =' /etc/exim4/exim4.conf.template; then
70-
sed -i '/interface =/d' /etc/exim4/exim4.conf.template
71-
sed -i 's|dkim_strict = 0|dkim_strict = 0\n interface = ${if exists{OUTGOING_IP}{${readfile{OUTGOING_IP}}}}|' /etc/exim4/exim4.conf.template
72-
fi
73-
fi
74-
75-
# Members of admin group should be permitted to enter admin folder
76-
if [ -d /home/admin ]; then
77-
setfacl -m "g:admin:r-x" /home/admin
78-
fi
79-
80-
# Fix sftp jail cronjob
81-
if [ -e "/etc/cron.d/hestia-sftp" ]; then
82-
if ! cat /etc/cron.d/hestia-sftp | grep -q 'root'; then
83-
echo "@reboot root /usr/local/hestia/bin/v-add-sys-sftp-jail" > /etc/cron.d/hestia-sftp
84-
fi
85-
fi
86-
87-
# Create default writeable folders for all users
88-
echo "(*) Updating default writable folders for all users..."
89-
for user in $($HESTIA/bin/v-list-sys-users plain); do
90-
mkdir -p \
91-
$HOMEDIR/$user/.cache \
92-
$HOMEDIR/$user/.config \
93-
$HOMEDIR/$user/.local \
94-
$HOMEDIR/$user/.composer \
95-
$HOMEDIR/$user/.ssh
96-
97-
chown $user:$user \
98-
$HOMEDIR/$user/.cache \
99-
$HOMEDIR/$user/.config \
100-
$HOMEDIR/$user/.local \
101-
$HOMEDIR/$user/.composer \
102-
$HOMEDIR/$user/.ssh
103-
done
104-
105-
# Remove redundant fail2ban jail
106-
if fail2ban-client status sshd > /dev/null 2>&1 ; then
107-
fail2ban-client stop sshd >/dev/null 2>&1
108-
if [ -f /etc/fail2ban/jail.d/defaults-debian.conf ]; then
109-
mkdir -p $HESTIA_BACKUP/conf/fail2ban/jail.d
110-
mv /etc/fail2ban/jail.d/defaults-debian.conf $HESTIA_BACKUP/conf/fail2ban/jail.d/
111-
fi
112-
fi
113-
114-
# Update Office 365/Microsoft 365 DNS template
115-
if [ -e "$HESTIA/data/templates/dns/office365.tpl" ]; then
116-
echo "(*) Updating DNS template for Office 365..."
117-
cp -f $HESTIA/install/deb/templates/dns/office365.tpl $HESTIA/data/templates/dns/office365.tpl
118-
fi
119-
120-
# Ensure that backup compression level is correctly set
121-
GZIP_LVL_CHECK=$(cat $HESTIA/conf/hestia.conf | grep BACKUP_GZIP)
122-
if [ -z "$GZIP_LVL_CHECK" ]; then
123-
echo "(*) Updating backup compression level variable..."
124-
$BIN/v-change-sys-config-value "BACKUP_GZIP" '9'
125-
fi
126-
127-
# Randomize Roundcube des_key for better security
128-
if [ -f "/etc/roundcube/config.inc.php" ]; then
129-
rcDesKey="$(openssl rand -base64 30 | tr -d "/" | cut -c1-24)"
130-
sed -i "s/vtIOjLZo9kffJoqzpSbm5r1r/$rcDesKey/g" /etc/roundcube/config.inc.php
131-
fi
132-
133-
# Place robots.txt to prevent webmail crawling by search engine bots.
134-
if [ -e "/var/lib/roundcube/" ]; then
135-
if [ ! -f "/var/lib/roundcube/robots.txt" ]; then
136-
echo "User-agent: *" > /var/lib/roundcube/robots.txt
137-
echo "Disallow: /" >> /var/lib/roundcube/robots.txt
138-
fi
139-
fi
140-
141-
# Installing postgresql repo
142-
if [ -e "/etc/postgresql" ]; then
143-
echo "(*) Enabling native PostgreSQL APT repository..."
144-
osname="$(cat /etc/os-release | grep "^ID\=" | sed "s/ID\=//g")"
145-
if [ "$osname" = "ubuntu" ]; then
146-
codename="$(lsb_release -s -c)"
147-
else
148-
codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))"
149-
fi
150-
echo "deb http://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > /etc/apt/sources.list.d/postgresql.list
151-
wget --quiet https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /tmp/psql_signing.key
152-
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/psql_signing.key > /dev/null 2>&1
153-
rm /tmp/psql_signing.key
154-
fi
155-
156-
# Hardening MySQL configuration, prevent local infile.
157-
if [ -e "/etc/mysql/my.cnf" ]; then
158-
mysql_local_infile_check=$(grep local-infile /etc/mysql/my.cnf)
159-
if [ -z "$mysql_local_infile_check" ]; then
160-
echo "(*) Hardening MySQL configuration..."
161-
sed -i '/symbolic-links\=0/a\local-infile=0' /etc/mysql/my.cnf
162-
fi
163-
fi
164-
165-
# Hardening nginx configuration, drop TLSv1.1 support.
166-
if [ -e "/etc/nginx/nginx.conf" ]; then
167-
nginx_tls_check=$(grep TLSv1.1 /etc/nginx/nginx.conf)
168-
if [ ! -z "$nginx_tls_check" ]; then
169-
echo "(*) Updating nginx security settings - disabling TLS v1.1..."
170-
sed -i 's/TLSv1.1 //g' /etc/nginx/nginx.conf
171-
fi
172-
fi
173-
174-
# Fix logrotate permission bug for nginx
175-
if [ -e "/etc/logrotate/nginx" ]; then
176-
sed -i "s/create 640 nginx adm/create 640/g" /etc/logrotate.d/nginx
177-
fi
178-
179-
# Fix logrotate permission bug for apache
180-
if [ -e "/etc/logrotate/apache2" ]; then
181-
sed -i "s/create 640 root adm/create 640/g" /etc/logrotate.d/apache2
182-
fi
183-
184-
# Repair messed up user log permissions from the logrotate bug. Ignoring errors
185-
for user in $($HESTIA/bin/v-list-users plain | cut -f1); do
186-
for domain in $($HESTIA/bin/v-list-web-domains $user plain | cut -f1); do
187-
chown root:$user /var/log/$WEB_SYSTEM/domains/$domain.* > /dev/null 2>&1
188-
for sub_domain in $($HESTIA/bin/v-list-web-domain $user $domain plain | cut -f7 | tr ',' '\n'); do
189-
chown root:$user /var/log/$WEB_SYSTEM/domains/$sub_domain.* > /dev/null 2>&1
190-
done
191-
done
192-
done
193-
194-
chown root:root /var/log/$WEB_SYSTEM/domains/$WEBMAIL_ALIAS* > /dev/null 2>&1
195-
196-
# Enable IMAP/POP3 quota information
197-
if [ "$IMAP_SYSTEM" = "dovecot" ]; then
198-
echo "(*) Enabling IMAP quota information reporting..."
199-
if [ -e /etc/dovecot/conf.d/20-pop3.conf ]; then
200-
cp -f $HESTIA/install/deb/dovecot/conf.d/20-pop3.conf /etc/dovecot/conf.d/20-pop3.conf
201-
fi
202-
if [ -e /etc/dovecot/conf.d/20-imap.conf ]; then
203-
cp -f $HESTIA/install/deb/dovecot/conf.d/20-imap.conf /etc/dovecot/conf.d/20-imap.conf
204-
fi
205-
if [ -e /etc/dovecot/conf.d/90-quota.conf ]; then
206-
cp -f $HESTIA/install/deb/dovecot/conf.d/90-quota.conf /etc/dovecot/conf.d/90-quota.conf
207-
fi
208-
fi
209-
210-
# Trigger multiphp legacy migration script
211-
num_php_versions=$(ls -d /etc/php/*/fpm/pool.d 2>/dev/null |wc -l)
212-
if [ "$num_php_versions" -gt 1 ] && [ -z "$WEB_BACKEND" ]; then
213-
echo "(*) Enabling modular Multi-PHP backend..."
214-
cp -rf $HESTIA/data/templates/web $HESTIA_BACKUP/templates/web
215-
bash $HESTIA/install/upgrade/manual/migrate_multiphp.sh > /dev/null 2>&1
216-
fi
217-
218-
# Disable global subfolder alias for webmail in favor of subdomain
219-
if [ -e /etc/nginx/conf.d/webmail.inc ]; then
220-
rm -f /etc/nginx/conf.d/webmail.inc
221-
fi
222-
if [ -e /etc/apache2/conf.d/roundcube.conf ]; then
223-
rm -f /etc/apache2/conf.d/roundcube.conf
224-
fi

0 commit comments

Comments
 (0)