mirror of
https://github.com/YunoHost-Apps/garradin_ynh.git
synced 2024-09-03 18:36:17 +02:00
Fix 0.9.8 upgrade's curl
This commit is contained in:
parent
0fa2b9ddda
commit
864e1f68cf
1 changed files with 12 additions and 5 deletions
|
@ -121,18 +121,25 @@ then
|
||||||
ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php"
|
ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php"
|
||||||
fi
|
fi
|
||||||
chmod 755 $final_path
|
chmod 755 $final_path
|
||||||
# Create the visitors permission if needed
|
|
||||||
if [ $is_public -eq 1 ]
|
# We need to have the app public before finalizing the upgrade
|
||||||
then
|
# So let's store its current state and allow visitors if needed
|
||||||
ynh_permission_update --permission "main" --add "visitors"
|
visitors_enabled=$(ynh_permission_has_user --permission=main --user=visitors)
|
||||||
|
if [ $visitors_enabled -eq 0 ]
|
||||||
|
ynh_permission_update --permission "main" --remove "visitors"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
#finalyse upgrade
|
# Finalize the upgrade
|
||||||
ynh_local_curl "/index.php"
|
ynh_local_curl "/index.php"
|
||||||
sleep 5
|
sleep 5
|
||||||
ynh_local_curl "/index.php"
|
ynh_local_curl "/index.php"
|
||||||
upgrade_type="UPGRADE_APP"
|
upgrade_type="UPGRADE_APP"
|
||||||
|
|
||||||
|
# Remove visitors access if they were not allowed initially
|
||||||
|
if [ $visitors_enabled -eq 0 ]
|
||||||
|
ynh_permission_update --permission "main" --remove "visitors"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue