diff --git a/scripts/upgrade b/scripts/upgrade index f864ea6..7a3784a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -3,8 +3,8 @@ 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_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 @@ -28,8 +28,9 @@ sudo sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/ttrss.conf -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" +# Update database schema +su - www-data -c "php5 $final_path/update.php --update-schema"