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

Fix permissions

This commit is contained in:
ericgaspar 2021-02-08 11:06:37 +01:00
parent 7d2df76225
commit 0a17a81f9c
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 18 additions and 11 deletions

View file

@ -146,11 +146,10 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
ynh_script_progression --message="Installing Piwigo with cURL..." --weight=5 ynh_script_progression --message="Installing Piwigo with cURL..." --weight=5
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" # Set the app as temporarily public for cURL call
# Reload SSOwat config ynh_permission_update --permission="main" --add="visitors"
yunohost app ssowatconf
# Reload Nginx # Reload NGINX
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
# Generate random password for admin # Generate random password for admin
@ -238,11 +237,9 @@ ynh_add_fail2ban_config --logpath="/var/log/${app}FailedLogins.log" --failregex=
ynh_script_progression --message="Configuring permissions..." ynh_script_progression --message="Configuring permissions..."
# Make app public if necessary # Make app public if necessary
if [ $is_public -eq 1 ] if [ $is_public -eq 0 ]
then then
# Everyone can access the app. ynh_permission_update --permission="main" --remove="visitors"
# The "main" permission is automatically created before the install script.
ynh_permission_update --permission="main" --add="visitors"
fi fi
#================================================= #=================================================

View file

@ -190,9 +190,8 @@ chmod 755 -R $final_path/_data
#================================================= #=================================================
ynh_script_progression --message="Upgrading Piwigo with cURL..." --weight=6 ynh_script_progression --message="Upgrading Piwigo with cURL..." --weight=6
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" # Set the app as temporarily public for cURL call
# Reload SSOwat config ynh_permission_update --permission="main" --add="visitors"
yunohost app ssowatconf
# Reload NGINX # Reload NGINX
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
@ -279,6 +278,17 @@ chown $app: "/var/log/${app}FailedLogins.log"
ynh_add_fail2ban_config --logpath="/var/log/${app}FailedLogins.log" --failregex="ip=<HOST>" --max_retry=6 ynh_add_fail2ban_config --logpath="/var/log/${app}FailedLogins.log" --failregex="ip=<HOST>" --max_retry=6
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring permissions..."
# Make app public if necessary
if [ $is_public -eq 0 ]
then
ynh_permission_update --permission="main" --remove="visitors"
fi
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================