Scripting Zarafa 7.2.x Updates

Zarafa Collaboration Platform is the email server of choice for our new customers. With that said, we have a lot of these installations being maintained in production. Below is our second generation automation script to update Zarafa to the latest 7.2.x release for users who are not using apt-get. Note this script is a modified version (to account for package naming convention) of our original script located at Scripting Zarafa Server Updates. Zarafa 7.2.x updates can be found here.

#!/bin/bash
#
# Updates Zarafa Server with the package provided by the download link.  
#
#
echo "Please insert zarafa download link, followed by [ENTER]:"
read download
apt-get update ; apt-get dist-upgrade
cp -r /etc/zarafa /etc/zarafa.bkp
cd /etc/zarafa.bkp
mysqldump -h mysql_host -u mysql_username -p'mysql_password' zarafa > zarafa-dump.sql
cd /tmp
wget $download
file="${download##*/}"
tar xvzf $file
folder=`basename "$file" .tar.gz`
cd $folder
dpkg -Bi l*
dpkg -i p*
dpkg -i z*
apt-get install -f
dpkg -Bi l*
dpkg -i p*
dpkg -i z*
apt-get install -f
apt-get autoremove
update-rc.d -f zarafa-ical remove
update-rc.d -f zarafa-gateway remove
service php5-fpm restart
zarafa-admin -V
echo "Please verify that zarafa is functioning, then delete /etc/zarafa.bkp"

Please note that the 7.2.2 package has major changes that will require manual intervention. See the Zarafa Community Hub announcement and changelog here.

Did you find this article useful? Why not share it with your friends?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.