diff --git a/scripts/install b/scripts/install index 34f89d4..f7d0348 100644 --- a/scripts/install +++ b/scripts/install @@ -23,6 +23,7 @@ fi sudo yunohost app setting movim admin -v $admin sudo yunohost app setting movim public_site -v $public_site +sudo yunohost app setting movim port -v $port # Generate random password db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p') diff --git a/scripts/upgrade b/scripts/upgrade index e69de29..826832e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -0,0 +1,19 @@ +#!/bin/bash + +# Retrieve arguments +path=$(sudo yunohost app setting movim path) + +# Install Movim files +final_path=/var/www/movim +sudo cp -a ../sources/* $final_path +sudo chown -R www-data: $final_path + +# Upgrade PHP dependencies +#sudo su -c "curl -sS https://getcomposer.org/installer | php -- --install-dir=$final_path" -s /bin/sh www-data +#sudo su -c "cd $final_path && php composer.phar install" -s /bin/sh www-data + +# Movim configuration +sudo sed -i "s@/ws/@$path/ws/@g" $final_path/app/assets/js/movim_websocket.js + +# Reload +sudo yunohost app ssowatconf