diff --git a/setup/dns.sh b/setup/dns.sh index c8a73a73..172faad2 100755 --- a/setup/dns.sh +++ b/setup/dns.sh @@ -54,6 +54,10 @@ cat > /etc/logrotate.d/nsd < /etc/fail2ban/jail.d/mailinabox.conf cp -f conf/fail2ban/filter.d/* /etc/fail2ban/filter.d/ +if [[ -n "$LX_ZONE" ]]; then +sed -i -e "s/iptables-allports/ipfilter/g" /etc/fail2ban/jail.conf +sed -i -e "s/iptables-allports/ipfilter/g" /etc/fail2ban/jail.d/mailinabox.conf +sed -i -e "s@/sbin/ipf@/native/usr/sbin/ipf@g" /etc/fail2ban/action.d/ipfilter.conf +fi + # On first installation, the log files that the jails look at don't all exist. # e.g., The roundcube error log isn't normally created until someone logs into # Roundcube for the first time. This causes fail2ban to fail to start. Later diff --git a/setup/web.sh b/setup/web.sh index 4433ff0d..9d8dce9a 100755 --- a/setup/web.sh +++ b/setup/web.sh @@ -103,12 +103,15 @@ fi # nginx configuration at /mailinabox-mobileconfig. mkdir -p /var/lib/mailinabox chmod a+rx /var/lib/mailinabox +if [[ -n "$LX_ZONE" ]]; then + apt_install uuid +fi cat conf/ios-profile.xml \ | sed "s/PRIMARY_HOSTNAME/$PRIMARY_HOSTNAME/" \ - | sed "s/UUID1/$(cat /proc/sys/kernel/random/uuid)/" \ - | sed "s/UUID2/$(cat /proc/sys/kernel/random/uuid)/" \ - | sed "s/UUID3/$(cat /proc/sys/kernel/random/uuid)/" \ - | sed "s/UUID4/$(cat /proc/sys/kernel/random/uuid)/" \ + | sed "s/UUID1/$(cat /proc/sys/kernel/random/uuid || uuid)/" \ + | sed "s/UUID2/$(cat /proc/sys/kernel/random/uuid || uuid)/" \ + | sed "s/UUID3/$(cat /proc/sys/kernel/random/uuid || uuid)/" \ + | sed "s/UUID4/$(cat /proc/sys/kernel/random/uuid || uuid)/" \ > /var/lib/mailinabox/mobileconfig.xml chmod a+r /var/lib/mailinabox/mobileconfig.xml