1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/friendica_ynh.git synced 2024-09-03 18:36:14 +02:00

Removed option for asking path and is_public

This commit is contained in:
Anmol 2017-07-21 17:35:00 +05:30
parent e068813085
commit 7ef732a58f
3 changed files with 9 additions and 40 deletions

View file

@ -28,21 +28,11 @@
"name": "domain", "name": "domain",
"type": "domain", "type": "domain",
"ask": { "ask": {
"en": "Choose a domain for Friendica", "en": "Choose a domain for Friendica.Friendica must be installed on the ROOT domain, so be careful",
"fr": "Choisissez un domaine pour Friendica" "fr": "Choisissez un domaine pour Friendica.Friendica doit etre installe a la racine, soyez prudent"
}, },
"example": "domain.org" "example": "domain.org"
}, },
{
"name": "path",
"type": "path",
"ask": {
"en": "No choice, Friendica must be installed on the ROOT domain, so be careful",
"fr": "Pas de choix, Friendica doit etre installe a la racine, soyez prudent"
},
"example": "/",
"default": "/"
},
{ {
"name": "admin", "name": "admin",
"type": "user", "type": "user",
@ -52,15 +42,7 @@
}, },
"example": "homer" "example": "homer"
}, },
{
"name": "is_public",
"type": "boolean",
"ask": {
"en": "Is it a public Friendica site ?",
"fr": "Est-ce un site public ?"
},
"default": "true"
}
] ]
} }
} }

View file

@ -22,9 +22,9 @@ ynh_abort_if_errors
# Retrieve arguments # Retrieve arguments
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH path_url='/'
admin=$YNH_APP_ARG_ADMIN admin=$YNH_APP_ARG_ADMIN
is_public=$YNH_APP_ARG_IS_PUBLIC is_public='true'
# This is a multi-instance app, meaning it can be installed several times independently # This is a multi-instance app, meaning it can be installed several times independently
# The id of the app as stated in the manifest is available as $YNH_APP_ID # The id of the app as stated in the manifest is available as $YNH_APP_ID
@ -130,16 +130,10 @@ sudo cp ../conf/poller-cron /etc/cron.d/$app
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================
if [ $is_public -eq 0 ]
then # Remove the public ac https://yourhostname.tld/install/testrewrite acess
ynh_app_setting_delete $app skipped_uris
fi
# Make app public if necessary
if [ $is_public -eq 1 ]
then
# unprotected_uris allows SSO credentials to be passed anyway. # unprotected_uris allows SSO credentials to be passed anyway.
ynh_app_setting_set $app unprotected_uris "/" ynh_app_setting_set $app unprotected_uris "/"
fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX

View file

@ -28,7 +28,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain) domain=$(ynh_app_setting_get $app domain)
path_url=$(ynh_app_setting_get $app path) path_url=$(ynh_app_setting_get $app path)
is_public=$(ynh_app_setting_get $app is_public)
final_path=$(ynh_app_setting_get $app final_path) final_path=$(ynh_app_setting_get $app final_path)
db_name=$(ynh_app_setting_get $app db_name) db_name=$(ynh_app_setting_get $app db_name)
@ -68,14 +67,8 @@ sudo chmod -R 777 $final_path/view/smarty3
#================================================= #=================================================
ynh_restore_file "/etc/cron.d/$app" ynh_restore_file "/etc/cron.d/$app"
# unprotected_uris allows SSO credentials to be passed anyway.
# Make app public if necessary ynh_app_setting_set $app unprotected_uris "/"
if [ "$is_public" = "Yes" ];
then
ynh_app_setting_set $app skipped_uris "/"
else
ynh_app_setting_set $app protected_uris "/"
fi
# And Reload services # And Reload services
sudo service php5-fpm reload sudo service php5-fpm reload