Scripting Kopano WebApp Updates

Kopano 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 first generation automation script to update the Kopano WebApp to the latest 3.4.x release for users who are not using apt-get. Note this script is a modified version of our original Server script located at Scripting Kopano Server Updates. Note you must have a Kopano Portal account to download the updates. In order to run this script, you will need to copy the downloaded packages and script below to the /tmp folder and run the script as seen below in the code block under usage.

# Upgrade kopano server using customer portal packages  
if [ -n "$1" ];then
	# update base debian server 
	apt-get update ; apt-get dist-upgrade
	# backup existing kopano webapp 
	read -p "Press [Enter] key to start backup..."
	cp -r /usr/share/kopano-webapp /usr/share/kopano-webapp.bkp
	# start kopano upgrade process
	read -p "Press [Enter] key to start upgrade..."
	cd /tmp
	tar xvzf $file
	folder=`basename "$file" .tar.gz`
	cd $folder
	dpkg -i k* ; apt-get install -f
	apt-get autoremove
	service nginx restart
	echo "Please verify that kopano webapp is functioning, then delete /usr/share/kopano-webapp.bkp"
    echo "Usage: /tmp/kopano-webapp-upgrade [upgrade].tar.gz"
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.