From 3c9e19a409868d288bdb30b4ad666827c6b0162b Mon Sep 17 00:00:00 2001 From: abeudin Date: Wed, 17 Dec 2014 10:44:31 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index f589fc9..720ac9f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -3,11 +3,11 @@ domain=$(sudo yunohost app setting ttrss domain) path=$(sudo yunohost app setting ttrss path) -db_user=ttrss -db_pwd=$(sudo yunohost app setting ttrss mysqlpwd) -db_file=../source/schema/versions/mysql/$(ls -vr ../source/schema/versions/mysql | head -1) +#db_user=ttrss +#db_pwd=$(sudo yunohost app setting ttrss mysqlpwd) +#db_file=../source/schema/versions/mysql/$(ls -vr ../source/schema/versions/mysql | head -1) -mysql -u $db_user -p$db_pwd $db_user < $db_file +#mysql -u $db_user -p$db_pwd $db_user < $db_file final_path=/var/www/ttrss sudo mkdir -p $final_path @@ -23,6 +23,9 @@ sudo sed -i "s,yunopath,https://$domain$path,g" $final_path/config.php sudo chown -R www-data: $final_path +# Update database schema +su - www-data -c "php5 $final_path/update.php --update-schema" + # Modify Nginx configuration file and copy it to Nginx conf directory sudo sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf @@ -32,3 +35,4 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/ttrss.conf sudo service nginx reload sudo yunohost app ssowatconf sudo yunohost app setting ttrss skipped_uris -v "/public.php,/api" +