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:
parent
a6d4a48601
commit
580d09bd00
3 changed files with 9 additions and 21 deletions
|
@ -101,10 +101,7 @@ ynh_script_progression --message="Setting up application with cURL..."
|
||||||
chown -R $app: $final_path
|
chown -R $app: $final_path
|
||||||
|
|
||||||
# Set the app as temporarily public for cURL call
|
# Set the app as temporarily public for cURL call
|
||||||
ynh_script_progression --message="Configuring ssowat ..."
|
ynh_permission_update --permission "main" --add "visitors"
|
||||||
ynh_app_setting_set --app=$app --key=skipped_uris --value="/"
|
|
||||||
# Reload SSOwat config
|
|
||||||
yunohost app ssowatconf
|
|
||||||
|
|
||||||
# Reload NGINX
|
# Reload NGINX
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
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_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"
|
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
|
# REMOVING NO MORE NEEDED FILES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -142,11 +133,10 @@ chown -R "$app":"$app" $final_path # modif perso
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring SSOwat..."
|
ynh_script_progression --message="Configuring SSOwat..."
|
||||||
|
|
||||||
# Make app public if necessary
|
# Make app public if necessary or protect it
|
||||||
if [ $is_public -eq 1 ]
|
if [ $is_public -eq 0 ]
|
||||||
then
|
then
|
||||||
# unprotected_uris allows SSO credentials to be passed anyway.
|
ynh_permission_update --permission "main" --remove "visitors"
|
||||||
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -72,7 +72,7 @@ ynh_system_user_create --username=$app
|
||||||
ynh_script_progression --message="Restoring user rights..."
|
ynh_script_progression --message="Restoring user rights..."
|
||||||
|
|
||||||
# Restore permissions on app files
|
# Restore permissions on app files
|
||||||
chown -R "$app":"$app" $final_path
|
chown -R $app:$app $final_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
|
|
|
@ -128,18 +128,16 @@ ynh_secure_remove --file="${final_path}/update"
|
||||||
ynh_script_progression --message="Securing files and directories..."
|
ynh_script_progression --message="Securing files and directories..."
|
||||||
|
|
||||||
# Set permissions on app files
|
# Set permissions on app files
|
||||||
chown -R "$app":"$app" $final_path # modif perso
|
chown -R $app:$app $final_path # modif perso
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading SSOwat configuration..."
|
ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1
|
||||||
|
|
||||||
# Make app public if necessary
|
if [ $contains_visitors -eq 1 ]
|
||||||
if [ $is_public -eq 1 ]
|
|
||||||
then
|
then
|
||||||
# unprotected_uris allows SSO credentials to be passed anyway
|
ynh_permission_update --permission "main" --remove "visitors"
|
||||||
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue