forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1.4.11.sh
More file actions
27 lines (23 loc) · 1.36 KB
/
1.4.11.sh
File metadata and controls
27 lines (23 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# Hestia Control Panel upgrade script for target version 1.4.11
#######################################################################################
####### Place additional commands below. #######
#######################################################################################
# Fix the potential issue of loading firewall rules
if [ "$FIREWALL_SYSTEM" = "iptables" ]; then
echo "[ * ] Updating firewall configuration..."
# Just in case, delete the legacy version loading script again to prevent any residue
rm -f /usr/lib/networkd-dispatcher/routable.d/50-ifup-hooks /etc/network/if-pre-up.d/iptables
# The firewall rules are loading by Systemd, the old loading script is no longer needed
rm -f /usr/lib/networkd-dispatcher/routable.d/10-hestia-iptables /etc/network/if-pre-up.d/hestia-iptables
$BIN/v-update-firewall
fi
if [ -f "/etc/exim4/exim4.conf.template" ]; then
test=$(grep 'require_files = ${local_part}:+${home}/.forward' /etc/exim4/exim4.conf.template)
if [ -z "$test" ]; then
echo "[ * ] Fix bug where email send to news@domain.com is handled by /var/spool/news"
insert="\ require_files = \${local_part}:+\${home}/.forward\n\ domains = +local_domains"
line=$(expr $(sed -n '/userforward/=' /etc/exim4/exim4.conf.template) + 1)
sed -i "${line}i $insert" /etc/exim4/exim4.conf.template
fi
fi