Skip to content

Commit 241d064

Browse files
author
Kristan Kenney
committed
Upgrade Apache/NGINX configuration files
1 parent 0b26d3b commit 241d064

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

install/upgrade/0.9.8-29.sh

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ mkdir -p $HESTIA_BACKUP/packages/
1717

1818
echo "(*) Upgrading to Hestia Control Panel v$VERSION..."
1919

20+
# Update Apache and NGINX configuration to support new file structure
21+
if [ -f /etc/apache2/apache.conf ]; then
22+
echo "(*) Updating Apache configuration..."
23+
cp -f $HESTIA/install/deb/apache2/apache.conf /etc/apache2/apache.conf
24+
fi
25+
if [ -f /etc/nginx/nginx.conf ]; then
26+
echo "(*) Updating nginx configuration..."
27+
cp -f $HESTIA/install/deb/nginx/nginx.conf /etc/nginx/nginx.conf
28+
fi
29+
2030
# Generating dhparam.
2131
if [ ! -e /etc/ssl/dhparam.pem ]; then
2232
echo "(*) Enabling HTTPS Strict Transport Security (HSTS) support"
@@ -167,16 +177,21 @@ if [ -z "$IMAP_SYSTEM" ]; then
167177
fi
168178
fi
169179

170-
# Rebuild mailboxes
171-
for user in `ls /usr/local/hestia/data/users/`; do
172-
echo "(*) Rebuilding mail domains for user: $user..."
173-
v-rebuild-mail-domains $user
174-
done
175-
176180
# Remove Webalizer and replace it with awstats as default
177181
echo "(*) Setting awstats as default web statistics backend..."
178182
apt purge webalizer -y > /dev/null 2>&1
179183
sed -i "s/STATS_SYSTEM='webalizer,awstats'/STATS_SYSTEM='awstats'/g" $HESTIA/conf/hestia.conf
180184

181185
# Run sftp jail once
182-
$HESTIA/bin/v-add-sys-sftp-jail
186+
$HESTIA/bin/v-add-sys-sftp-jail
187+
188+
# Rebuild user
189+
for user in `ls /usr/local/hestia/data/users/`; do
190+
echo "(*) Rebuilding domains and account for user: $user..."
191+
v-rebuild-web-domains $user
192+
sleep 0.5
193+
v-rebuild-dns-domains $user
194+
sleep 0.5
195+
v-rebuild-mail-domains $user
196+
sleep 0.5
197+
done

0 commit comments

Comments
 (0)