File tree Expand file tree Collapse file tree 5 files changed +50
-6
lines changed
Expand file tree Collapse file tree 5 files changed +50
-6
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ if [ -z "$physical_nics" ]; then
4646fi
4747
4848for nic in $physical_nics ; do
49- nic_ipv4s=" $( ip -4 -d -j addr show " $nic " | jq -r ' .[].addr_info[] | if .scope == "global" then .local else empty end' ) "
49+ nic_ipv4s=" $( ip -4 -d -j addr show " $nic " | jq -r ' .[] | select(length > 0) | .addr_info[] | if .scope == "global" then .local else empty end' ) ; "
5050 if [ -z " $ips " ]; then
5151 ips=" $nic_ipv4s "
5252 else
Original file line number Diff line number Diff line change 1117a18,19
2- > SRS_SECRET = readfile{/etc/exim4/srs.conf}
2+ > SRS_SECRET = ${ readfile{/etc/exim4/srs.conf} }
33>
44326a332,348
55> inbound_srs:
Original file line number Diff line number Diff line change @@ -257,8 +257,18 @@ if [ "$MAIL_SYSTEM" = "exim4" ]; then
257257 echo $srs > /etc/exim4/srs.conf
258258 chmod 640 /etc/exim4/srs.conf
259259 chown root:Debian-exim /etc/exim4/srs.conf
260- echo " [ * ] Update exim4.conf.template ..."
261- patch /etc/exim4/exim4.conf.template $HESTIA /install/upgrade/patch/3661-exim-srs-support.patch
260+ cp /etc/exim4/exim4.conf.template /etc/exim4/exim4.conf.template.staging
261+ patch /etc/exim4/exim4.conf.template.staging $HESTIA /install/upgrade/patch/3661-exim-srs-support.patch
262+ exim -C /etc/exim4/exim4.conf.template.staging
263+ if [ " $? " -ne 0 ]; then
264+ # add_upgrade_message "Unable to successfully aply the SRS update patch for Exim.\n If you use SMTP relay with the SRS feature use the exim config found in /usr/local/hestia/install/deb/exim/exim4.conf.4.95.template"
265+ " $BIN " /v-add-user-notification admin " Unable to apply patch to Exim config" ' Unable to successfully aply the SRS update patch for Exim.<br /> If you use SMTP relay with the SRS feature use the exim config found in /usr/local/hestia/install/deb/exim/exim4.conf.4.95.template'
266+ sed -i " s/" " $( grep -m 1 " Unable to apply patch to Exim config" " $HESTIA " /data/users/admin/notifications.conf | awk ' {print $1}' ) " " /NID='1'/" " $HESTIA " /data/users/admin/notifications.conf
267+ else
268+ echo " [ * ] Update exim4.conf.template ..."
269+ cp /etc/exim4/exim4.conf.template.staging /etc/exim4/exim4.conf.template
270+ fi
271+ rm /etc/exim4/exim4.conf.template.staging
262272 else
263273 sed -i " s/SRS_SECRET = readfile{\/etc\/exim4\/srs.conf}/SRS_SECRET = \$ {readfile{\/etc\/exim4\/srs.conf}}/g" /etc/exim4/exim4.conf.template
264274 chown root:Debian-exim /etc/exim4/srs.conf
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Hestia Control Panel upgrade script for target version 1.8.0
4+
5+ # ######################################################################################
6+ # ###### Place additional commands below. #######
7+ # ######################################################################################
8+ # ###### upgrade_config_set_value only accepts true or false. #######
9+ # ###### #######
10+ # ###### Pass through information to the end user in case of a issue or problem #######
11+ # ###### #######
12+ # ###### Use add_upgrade_message "My message here" to include a message #######
13+ # ###### in the upgrade notification email. Example: #######
14+ # ###### #######
15+ # ###### add_upgrade_message "My message here" #######
16+ # ###### #######
17+ # ###### You can use \n within the string to create new lines. #######
18+ # ######################################################################################
19+
20+ upgrade_config_set_value ' UPGRADE_UPDATE_WEB_TEMPLATES' ' true'
21+ upgrade_config_set_value ' UPGRADE_UPDATE_DNS_TEMPLATES' ' false'
22+ upgrade_config_set_value ' UPGRADE_UPDATE_MAIL_TEMPLATES' ' true'
23+ upgrade_config_set_value ' UPGRADE_REBUILD_USERS' ' true'
24+ upgrade_config_set_value ' UPGRADE_UPDATE_FILEMANAGER_CONFIG' ' false'
25+
26+ if [ " $MAIL_SYSTEM " = " exim4" ]; then
27+ exim_version=$( exim4 --version | head -1 | awk ' {print $3}' | cut -f -2 -d .)
28+ # if Exim version > 4.95 or greater!
29+ if version_ge " $exim_version " " 4.95" ; then
30+ sed -i " s/SRS_SECRET = readfile{\/etc\/exim4\/srs.conf}/SRS_SECRET = \$ {readfile{\/etc\/exim4\/srs.conf}}/g" /etc/exim4/exim4.conf.template
31+ chown root:Debian-exim /etc/exim4/srs.conf
32+ chown 644 /etc/exim4/srs.conf
33+ fi
34+ fi
Original file line number Diff line number Diff line change @@ -39,10 +39,10 @@ adapt_nginx_config() {
3939 fi
4040 for nic in $physical_nics ; do
4141 if [ -z " $ipv4_scope_global " ]; then
42- ipv4_scope_global=" $( ip -4 -d -j addr show " $nic " | jq -r ' .[].addr_info[] | if .scope == "global" then .local else empty end' ) "
42+ ipv4_scope_global=" $( ip -4 -d -j addr show " $nic " | jq -r ' .[] | select(length > 0) | .addr_info[] | if .scope == "global" then .local else empty end' ) ; "
4343 fi
4444 if [ -z " $ipv6_scope_global " ]; then
45- ipv6_scope_global=" $( ip -6 -d -j addr show " $nic " | jq -r ' .[].addr_info[] | if .scope == "global" then .local else empty end' ) "
45+ ipv6_scope_global=" $( ip -6 -d -j addr show " $nic " | jq -r ' .[] | select(length > 0) | .addr_info[] | if .scope == "global" then .local else empty end' ) ; "
4646 fi
4747 done
4848
You can’t perform that action at this time.
0 commit comments