mirror of
https://github.com/YunoHost-Apps/cryptpad_ynh.git
synced 2024-09-03 18:26:14 +02:00
Update install
This commit is contained in:
parent
541928cad7
commit
8ed77ec4ad
1 changed files with 10 additions and 2 deletions
|
@ -184,8 +184,16 @@ fi
|
||||||
if ! [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
|
if ! [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
|
||||||
ynh_permission_url --permission="main" --add_url=$sandboxdomain --auth_header=true
|
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
|
# 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
|
# so we use ${sandboxdomain%/} to remove the eccessive trailing slash # it doesnt work
|
||||||
ynh_read_var_in_file --file="/etc/ssowat/conf.json" --key="uris"
|
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
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue