1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-04 15:54:48 +01:00

update z-push to 2.3.5 on the upstream repository z-push.org (#1153)

This commit is contained in:
Michael Kroes
2017-04-17 13:42:44 +02:00
committed by Joshua Tauberer
parent 2a046a22f4
commit 416dbebf45
3 changed files with 22 additions and 4 deletions

View File

@@ -22,7 +22,8 @@ apt_install \
php5enmod imap
# Copy Z-Push into place.
TARGETHASH=80cbe53de4ab8dd598d1f2af6f0a23fa396c529a
TARGETHASH=3ce78c23e02198bffe80c983ce247350c27590bd
VERSION=2.3.5
needs_update=0 #NODOC
if [ ! -f /usr/local/lib/z-push/version ]; then
needs_update=1 #NODOC
@@ -31,7 +32,13 @@ elif [[ $TARGETHASH != `cat /usr/local/lib/z-push/version` ]]; then
needs_update=1 #NODOC
fi
if [ $needs_update == 1 ]; then
git_clone https://github.com/fmbiete/Z-Push-contrib $TARGETHASH '' /usr/local/lib/z-push
wget_verify http://download.z-push.org/final/2.3/z-push-$VERSION.tar.gz $TARGETHASH /tmp/z-push.tar.gz
rm -rf /usr/local/lib/z-push
tar -xzf /tmp/z-push.tar.gz -C /usr/local/lib/
rm /tmp/z-push.tar.gz
mv /usr/local/lib/z-push-$VERSION /usr/local/lib/z-push
rm -f /usr/sbin/z-push-{admin,top}
ln -s /usr/local/lib/z-push/z-push-admin.php /usr/sbin/z-push-admin
ln -s /usr/local/lib/z-push/z-push-top.php /usr/sbin/z-push-top
@@ -67,6 +74,7 @@ cp conf/zpush/backend_caldav.php /usr/local/lib/z-push/backend/caldav/config.php
rm -f /usr/local/lib/z-push/autodiscover/config.php
cp conf/zpush/autodiscover_config.php /usr/local/lib/z-push/autodiscover/config.php
sed -i "s/PRIMARY_HOSTNAME/$PRIMARY_HOSTNAME/" /usr/local/lib/z-push/autodiscover/config.php
sed -i "s^define('TIMEZONE', .*^define('TIMEZONE', '$(cat /etc/timezone)');^" /usr/local/lib/z-push/autodiscover/config.php
# Some directories it will use.
@@ -93,3 +101,7 @@ EOF
# Restart service.
restart_service php5-fpm
# Fix states after upgrade
hide_output z-push-admin -a fixstates