mirror of
https://github.com/YunoHost-Apps/dotclear2_ynh.git
synced 2024-09-03 18:26:29 +02:00
Trying to fix the broken setup if not connected
This commit is contained in:
parent
42106f7ff6
commit
79e889f879
1 changed files with 8 additions and 5 deletions
|
@ -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 "/"
|
||||
fi
|
||||
# Regenerate SSOwat conf
|
||||
sudo yunohost app setting $app protected_uris -v "/"
|
||||
sudo yunohost app ssowatconf
|
||||
fi
|
||||
|
||||
# Success or not success
|
||||
if [ `echo $success | grep -c success` -gt 0 ]
|
||||
|
|
Loading…
Reference in a new issue