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

Update upgrade

This commit is contained in:
ericgaspar 2021-09-26 13:55:19 +02:00
parent 0fa2b9ddda
commit d6fcd29677
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -121,9 +121,10 @@ then
ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php"
fi
chmod 755 $final_path
# Create the visitors permission if needed
if [ $is_public -eq 1 ]
then
visitors_enabled=$(ynh_permission_has_user "main" "visitors")
if [[ $visitors_enabled -eq 0 ]]
ynh_permission_update --permission "main" --add "visitors"
fi
@ -133,6 +134,11 @@ then
sleep 5
ynh_local_curl "/index.php"
upgrade_type="UPGRADE_APP"
if [[ $visitors_enabled -eq 0 ]]
ynh_permission_update --permission "main" --remove "visitors"
fi
fi
#=================================================