#!/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