1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pluxml_ynh.git synced 2024-09-03 20:16:02 +02:00

Set permissions

This commit is contained in:
ericgaspar 2020-12-14 22:26:46 +01:00
parent a6d4a48601
commit 580d09bd00
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 9 additions and 21 deletions

View file

@ -101,10 +101,7 @@ ynh_script_progression --message="Setting up application with cURL..."
chown -R $app: $final_path
# Set the app as temporarily public for cURL call
ynh_script_progression --message="Configuring ssowat ..."
ynh_app_setting_set --app=$app --key=skipped_uris --value="/"
# Reload SSOwat config
yunohost app ssowatconf
ynh_permission_update --permission "main" --add "visitors"
# Reload NGINX
ynh_systemd_action --service_name=nginx --action=reload
@ -113,12 +110,6 @@ ynh_systemd_action --service_name=nginx --action=reload
ynh_script_progression --message="Finalizing installation..."
ynh_local_curl "/install.php" "default_lang=$language" "install=Installer" "name=$admin" "login=$admin" "pwd=$password" "pwd2=$password" "data=1" "email=$admin@$domain" "timezone=Europe/Paris"
# Remove the public access
if [ $is_public -eq 0 ]
then
ynh_app_setting_delete --app=$app --key=skipped_uris
fi
#=================================================
# REMOVING NO MORE NEEDED FILES
#=================================================
@ -142,11 +133,10 @@ chown -R "$app":"$app" $final_path # modif perso
#=================================================
ynh_script_progression --message="Configuring SSOwat..."
# Make app public if necessary
if [ $is_public -eq 1 ]
# Make app public if necessary or protect it
if [ $is_public -eq 0 ]
then
# unprotected_uris allows SSO credentials to be passed anyway.
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
ynh_permission_update --permission "main" --remove "visitors"
fi
#=================================================

View file

@ -72,7 +72,7 @@ ynh_system_user_create --username=$app
ynh_script_progression --message="Restoring user rights..."
# Restore permissions on app files
chown -R "$app":"$app" $final_path
chown -R $app:$app $final_path
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION

View file

@ -128,18 +128,16 @@ ynh_secure_remove --file="${final_path}/update"
ynh_script_progression --message="Securing files and directories..."
# Set permissions on app files
chown -R "$app":"$app" $final_path # modif perso
chown -R $app:$app $final_path # modif perso
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Upgrading SSOwat configuration..."
ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1
# Make app public if necessary
if [ $is_public -eq 1 ]
if [ $contains_visitors -eq 1 ]
then
# unprotected_uris allows SSO credentials to be passed anyway
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
ynh_permission_update --permission "main" --remove "visitors"
fi
#=================================================