1+ #! /bin/bash
2+
3+ # Hestia Control Panel upgrade script for target version 1.5.11
4+
5+ # ######################################################################################
6+ # ###### Place additional commands below. #######
7+ # ######################################################################################
8+ # ###### Pass through information to the end user in case of a issue or problem #######
9+ # ###### #######
10+ # ###### Use add_upgrade_message "My message here" to include a message #######
11+ # ###### in the upgrade notification email. Example: #######
12+ # ###### #######
13+ # ###### add_upgrade_message "My message here" #######
14+ # ###### #######
15+ # ###### You can use \n within the string to create new lines. #######
16+ # ######################################################################################
17+
18+ upgrade_config_set_value ' UPGRADE_UPDATE_WEB_TEMPLATES' ' false'
19+ upgrade_config_set_value ' UPGRADE_UPDATE_DNS_TEMPLATES' ' false'
20+ upgrade_config_set_value ' UPGRADE_UPDATE_MAIL_TEMPLATES' ' false'
21+ upgrade_config_set_value ' UPGRADE_REBUILD_USERS' ' false'
22+ upgrade_config_set_value ' UPGRADE_UPDATE_FILEMANAGER_CONFIG' ' false'
23+
24+ PORT=$( cat $HESTIA /nginx/conf/nginx.conf | grep " listen" | sed ' s/[^0-9]*//g' )
25+
26+ if [ " $PORT " != " 8083" ]; then
27+ # Update F2B chains config
28+ if [ -f " $HESTIA /data/firewall/chains.conf" ]; then
29+ # Update value in chains.conf
30+ sed -i " s/PORT='8083'/PORT='$PORT '/g" $HESTIA /data/firewall/chains.conf
31+ fi
32+
33+ # Restart services
34+ if [ -n " $FIREWALL_SYSTEM " ] && [ " $FIREWALL_SYSTEM " != no ]; then
35+ $HESTIA /bin/v-stop-firewall
36+ $HESTIA /bin/v-update-firewall
37+
38+ fi
39+ fi
40+
41+ # Fix Roundcube logdir permission
42+ if [ -d " /var/log/roundcube" ]; then
43+ chown www-data:www-data /var/log/roundcube
44+ fi
45+
46+ # Fix bug in nginx.conf for proxy cache
47+ if [ -d " /etc/nginx/nginx.conf" ]; then
48+ echo " [ ! ] Fixed an issue with proxy cache and redirects"
49+ sed -i ' s/proxy_cache_key "$host$request_uri $cookie_user";/proxy_cache_key "$scheme$request_method$host$request_uri";/g' /etc/nginx/nginx.conf
50+ fi
0 commit comments