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:
parent
7d2df76225
commit
0a17a81f9c
2 changed files with 18 additions and 11 deletions
|
@ -146,11 +146,10 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Installing Piwigo with cURL..." --weight=5
|
||||
|
||||
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
|
||||
# Reload SSOwat config
|
||||
yunohost app ssowatconf
|
||||
# Set the app as temporarily public for cURL call
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
|
||||
# Reload Nginx
|
||||
# Reload NGINX
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
# 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..."
|
||||
|
||||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
if [ $is_public -eq 0 ]
|
||||
then
|
||||
# Everyone can access the app.
|
||||
# The "main" permission is automatically created before the install script.
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
ynh_permission_update --permission="main" --remove="visitors"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -190,9 +190,8 @@ chmod 755 -R $final_path/_data
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading Piwigo with cURL..." --weight=6
|
||||
|
||||
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
|
||||
# Reload SSOwat config
|
||||
yunohost app ssowatconf
|
||||
# Set the app as temporarily public for cURL call
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
|
||||
# Reload NGINX
|
||||
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
|
||||
|
||||
#=================================================
|
||||
# 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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue