From 8ed77ec4ad539ccbf554926a56b75b3aa8574027 Mon Sep 17 00:00:00 2001 From: DDATAA <45762540+Ddataa@users.noreply.github.com> Date: Thu, 27 Oct 2022 16:05:42 +0000 Subject: [PATCH] Update install --- scripts/install | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index ac93db8..4fc97a4 100644 --- a/scripts/install +++ b/scripts/install @@ -184,8 +184,16 @@ fi if ! [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then ynh_permission_url --permission="main" --add_url=$sandboxdomain --auth_header=true # there is a bug in core that add a slash at the end of domain in ssowat conf for uris var - # so we use ${sandboxdomain%/} to remove the eccessive trailing slash - ynh_read_var_in_file --file="/etc/ssowat/conf.json" --key="uris" + # so we use ${sandboxdomain%/} to remove the eccessive trailing slash # it doesnt work + uri1=$domain + uri2=$sandboxdomain + + #we delete the uris from cryptpad.main + cat /etc/ssowat/conf.json | jq 'del(.permissions[] | select(.label=="CryptPad") | .uris)' + #we write them again + cat /etc/ssowat/conf.json | jq --arg uri1 "$uri1" '(.permissions[] | select(.label=="CryptPad") | .uris[0]) |=$uri1' + cat /etc/ssowat/conf.json | jq --arg uri2 "$uri2" '(.permissions[] | select(.label=="CryptPad") | .uris[1]) |=$uri2' + fi #=================================================