mirror of
https://github.com/YunoHost-Apps/xwiki_ynh.git
synced 2024-09-03 20:36:11 +02:00
Fix path management when install on root
This commit is contained in:
parent
cd216399c7
commit
d89ee08fe4
1 changed files with 6 additions and 6 deletions
|
@ -21,8 +21,8 @@ if [ $path == '/' ]; then
|
||||||
path3=''
|
path3=''
|
||||||
else
|
else
|
||||||
install_on_root=false
|
install_on_root=false
|
||||||
path2=${path/#\//}/
|
path2=${path/#\//}/ # path=/xwiki -> xwiki/
|
||||||
path3=${path/#\//}
|
path3=${path/#\//} # path=/xwiki -> xwiki
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -66,13 +66,13 @@ install_exension() {
|
||||||
chown root:root $temp_dir
|
chown root:root $temp_dir
|
||||||
|
|
||||||
ynh_add_config --template=install_extensions.xml --destination=$temp_dir/install_extensions.xml
|
ynh_add_config --template=install_extensions.xml --destination=$temp_dir/install_extensions.xml
|
||||||
status_raw=$($curl -i --user "superadmin:$super_admin_pwd" -X PUT -H 'Content-Type: text/xml' "http://127.0.0.1:$port$path/rest/jobs?jobType=install&async=true" --upload-file $temp_dir/install_extensions.xml)
|
status_raw=$($curl -i --user "superadmin:$super_admin_pwd" -X PUT -H 'Content-Type: text/xml' "http://127.0.0.1:$port/${path2}rest/jobs?jobType=install&async=true" --upload-file $temp_dir/install_extensions.xml)
|
||||||
state_request=$(echo $status_raw | $xq -x '//jobStatus/ns2:state')
|
state_request=$(echo $status_raw | $xq -x '//jobStatus/ns2:state')
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
status_raw=$($curl --user "superadmin:$super_admin_pwd" -X GET -H 'Content-Type: text/xml' "http://127.0.0.1:$port$path/rest/jobstatus/extension/provision/$job_id")
|
status_raw=$($curl --user "superadmin:$super_admin_pwd" -X GET -H 'Content-Type: text/xml' "http://127.0.0.1:$port/${path2}rest/jobstatus/extension/provision/$job_id")
|
||||||
state_request=$(echo "$status_raw" | $xq -x '//jobStatus/state')
|
state_request=$(echo "$status_raw" | $xq -x '//jobStatus/state')
|
||||||
|
|
||||||
if [ -z "$state_request" ]; then
|
if [ -z "$state_request" ]; then
|
||||||
|
@ -96,7 +96,7 @@ wait_xwiki_started() {
|
||||||
local curl='curl --silent --show-error'
|
local curl='curl --silent --show-error'
|
||||||
|
|
||||||
while echo "$res" | grep -q 'meta http-equiv="refresh" content="1"'; do
|
while echo "$res" | grep -q 'meta http-equiv="refresh" content="1"'; do
|
||||||
res=$($curl "http://127.0.0.1:$port$path/bin/view/Main/")
|
res=$($curl "http://127.0.0.1:$port/${path2}bin/view/Main/")
|
||||||
sleep 10
|
sleep 10
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ wait_for_flavor_install() {
|
||||||
wait_xwiki_started
|
wait_xwiki_started
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
status_raw=$($curl --user "superadmin:$super_admin_pwd" -X GET -H 'Content-Type: text/xml' "http://127.0.0.1:$port$path/rest/jobstatus/extension/action/$flavor_job_id")
|
status_raw=$($curl --user "superadmin:$super_admin_pwd" -X GET -H 'Content-Type: text/xml' "http://127.0.0.1:$port/${path2}rest/jobstatus/extension/action/$flavor_job_id")
|
||||||
state_request=$(echo "$status_raw" | $xq -x '//jobStatus/state')
|
state_request=$(echo "$status_raw" | $xq -x '//jobStatus/state')
|
||||||
|
|
||||||
if [ -z "$state_request" ]; then
|
if [ -z "$state_request" ]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue