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

fixes comments by @JoshData

This commit is contained in:
Joel Kåberg 2014-09-01 10:02:46 +02:00
parent ee244386ed
commit 8b2fed1a2a

View File

@ -13,20 +13,19 @@ apt_install \
apt-get purge -qq -y owncloud* apt-get purge -qq -y owncloud*
# Install ownCloud from source # Install ownCloud from source
# Check if ownCloud dir exist, and check if version matches 7.0.1 (if it does, upgrade)
owncloud_ver=7.0.2
if [ ! -d /usr/local/lib/owncloud/ ] \
|| ! grep -q $owncloud_ver /usr/local/lib/owncloud/version.php; then
echo installing ownCloud... echo installing ownCloud...
rm -f /tmp/owncloud.zip rm -f /tmp/owncloud.zip
wget -qO /tmp/owncloud.zip https://download.owncloud.org/community/owncloud-latest.zip wget -qO /tmp/owncloud.zip https://download.owncloud.org/community/owncloud-$owncloud_ver.zip
unzip -u -o -q /tmp/owncloud.zip -d /usr/local/lib #either extracts new or replaces current files
if [ ! -d /usr/local/lib/owncloud ]; then hide_output php /usr/local/lib/owncloud/occ upgrade #if OC is up-to-date it wont matter
# fresh install
unzip -q /tmp/owncloud.zip -d /usr/local/lib
else
# upgrade existing install
unzip -u -o -q /tmp/owncloud.zip -d /usr/local/lib
hide_output php /usr/local/lib/owncloud/occ upgrade
fi
rm -f /tmp/owncloud.zip rm -f /tmp/owncloud.zip
fi
# Setup ownCloud if the ownCloud database does not yet exist. Running setup when # Setup ownCloud if the ownCloud database does not yet exist. Running setup when
# the database does exist wipes the database and user data. # the database does exist wipes the database and user data.