From 7a1bc14448d5fb7c0d5e3b89c5eb8852c182a7ba Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Mon, 29 Dec 2014 18:08:29 +0100 Subject: [PATCH] add upgrade scripts --- scripts/upgrade | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 scripts/upgrade diff --git a/scripts/upgrade b/scripts/upgrade new file mode 100644 index 0000000..ea44ca5 --- /dev/null +++ b/scripts/upgrade @@ -0,0 +1,27 @@ +#!/bin/bash + +# Retrieve arguments +domain=$(sudo yunohost app setting z-push domain) +path="/Microsoft-Server-ActiveSync" + +# Prereqs +sudo apt-get install php-soap php5-imap libawl-php php5-xsl + + +# Copy files to the right place +final_path=/var/www/z-push +sudo mkdir -p $final_path +sudo cp -a ../sources/* $final_path + +# Set permissions to roundcube directory +sudo chown -R www-data: $final_path + +# Modify Nginx configuration file and copy it to Nginx conf directory +sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf +sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/z-push.conf + +# Reload Nginx and regenerate SSOwat conf +sudo service nginx reload +sudo yunohost app ssowatconf + +