diff --git a/setup/web.sh b/setup/web.sh index ed37e5e3..d02ed8bd 100755 --- a/setup/web.sh +++ b/setup/web.sh @@ -64,12 +64,15 @@ tools/editconf.py /etc/php/7.2/fpm/pool.d/www.conf -c ';' \ # 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