mirror of
https://github.com/YunoHost-Apps/xwiki_ynh.git
synced 2024-09-03 20:36:11 +02:00
Fix install
This commit is contained in:
parent
0253b5bf9f
commit
15489df68f
5 changed files with 13 additions and 3 deletions
|
@ -74,6 +74,14 @@ install_exension() {
|
|||
done
|
||||
}
|
||||
|
||||
wait_xwiki_started() {
|
||||
local res
|
||||
while echo "$res" | grep -q 'meta http-equiv="refresh" content="1"'; do
|
||||
res=($curl "http://localhost:$port/xwiki/bin/view/Main/")
|
||||
sleep 10
|
||||
done
|
||||
}
|
||||
|
||||
wait_for_flavor_install() {
|
||||
local flavor_job_id='org.xwiki.platform%3Axwiki-platform-distribution-flavor-mainwiki/wiki%3Axwiki'
|
||||
local status_raw
|
||||
|
@ -82,9 +90,7 @@ wait_for_flavor_install() {
|
|||
local curl='curl --silent --show-error'
|
||||
|
||||
# Need to call main page to start xwiki service
|
||||
$curl "http://localhost:$port/xwiki/bin/view/Main/" > /dev/null &
|
||||
|
||||
sleep 20
|
||||
wait_xwiki_started
|
||||
|
||||
while true; do
|
||||
status_raw=$($curl --user "superadmin:$super_admin_pwd" -X GET -H 'Content-Type: text/xml' "http://localhost:$port/xwiki/rest/jobstatus/extension/action/$flavor_job_id")
|
||||
|
|
|
@ -33,6 +33,7 @@ ynh_change_url_nginx_config
|
|||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="$systemd_match_start_line"
|
||||
wait_xwiki_started
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -84,6 +84,7 @@ disable_super_admin
|
|||
|
||||
ynh_script_progression --message='Starting a systemd service...' --weight=1
|
||||
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="$systemd_match_start_line"
|
||||
wait_xwiki_started
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -47,6 +47,7 @@ yunohost service add $app --description=XWiki --log="/var/log/$app/$app.log"
|
|||
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="$systemd_match_start_line"
|
||||
wait_xwiki_started
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -88,6 +88,7 @@ disable_super_admin
|
|||
|
||||
ynh_script_progression --message='Starting a systemd service...' --weight=1
|
||||
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="$systemd_match_start_line"
|
||||
wait_xwiki_started
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Add table
Reference in a new issue