1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-22 02:17:26 +00:00

Change z-push to use the git repository instead of the tar ball (#1305)

This commit is contained in:
Michael Kroes 2017-12-23 23:51:18 +01:00 committed by Joshua Tauberer
parent 88604074d6
commit a0e603a3c6
2 changed files with 9 additions and 8 deletions

View File

@ -16,6 +16,7 @@ Mail:
Installer:
* We now run `apt-get autoremove` at the start of setup to clear out old packages, especially old kernels that take up a lot of space. On the first run, this step may take a long time.
* We now fetch z-push from their tagged git repository
v0.25 (November 15, 2017)
-------------------------

View File

@ -22,27 +22,27 @@ apt_install \
phpenmod -v php7.0 imap
# Copy Z-Push into place.
TARGETHASH=aae5093212ac0b7d8bf2d79fd5b87ca5bbf091cb
VERSION=2.3.8
needs_update=0 #NODOC
if [ ! -f /usr/local/lib/z-push/version ]; then
needs_update=1 #NODOC
elif [[ $TARGETHASH != `cat /usr/local/lib/z-push/version` ]]; then
elif [[ $VERSION != `cat /usr/local/lib/z-push/version` ]]; then
# checks if the version
needs_update=1 #NODOC
fi
if [ $needs_update == 1 ]; then
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
git_clone https://stash.z-hub.io/scm/zp/z-push.git $VERSION '' /tmp/z-push
mkdir /usr/local/lib/z-push
cp -r /tmp/z-push/src/* /usr/local/lib/z-push
rm -rf /tmp/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
echo $TARGETHASH > /usr/local/lib/z-push/version
echo $VERSION > /usr/local/lib/z-push/version
fi
# Configure default config.