From 79e889f879ad31e2fd2dadb7579a5cfe069add77 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 14 Sep 2015 20:04:15 +0000 Subject: [PATCH] Trying to fix the broken setup if not connected --- scripts/install | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index 02d97ee..9548ef6 100755 --- a/scripts/install +++ b/scripts/install @@ -53,19 +53,22 @@ sed -i "s@YNH_WWW_ALIAS@$directory/@g" ../conf/nginx.conf sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf sudo /etc/init.d/nginx reload +# Removing protection like a public app to finish installation +sudo yunohost app setting $app unprotected_uris -v "/" +sudo yunohost app ssowatconf + # Setting first user details and filling database calling admin/install/index.php success=`curl -L --cacert /etc/yunohost/certs/$domain/ca.pem -F "u_email=$email" -F "u_firstname=$firstname" -F "u_name=$lastname" -F "u_login=$admin" -F "u_pwd=$admin_password" -F "u_pwd2=$admin_password" -F "u_date=$timezone" https://$domain$path/admin/install/index.php` # success=`curl -L --cacert /etc/yunohost/certs/$domain/ca.pem -H 'Host: $domain' -X POST --data '?u_email=$EMAIL&u_firstname=$FIRSTNAME&u_name=$NAME&u_login=$LOGIN&u_pwd=$admin_password&u_pwd2=$admin_password&u_date=$timezone' https://$domain$path/admin/install/index.php` # Now that we curl'ed the setup we can lock the UI if it's private -# If app is public, add url to SSOWat conf as skipped_uris -if [ "$is_public" = "Yes" ]; +# If app is public, leave as it is +if [ "$is_public" = "No" ]; then # unprotected_uris allows SSO credentials to be passed anyway. - sudo yunohost app setting $app unprotected_uris -v "/" + sudo yunohost app setting $app protected_uris -v "/" + sudo yunohost app ssowatconf fi -# Regenerate SSOwat conf -sudo yunohost app ssowatconf # Success or not success if [ `echo $success | grep -c success` -gt 0 ]