mirror of
https://github.com/YunoHost-Apps/cryptpad_ynh.git
synced 2024-09-03 18:26:14 +02:00
Update upgrade
write to ssowat conf.json.persistent to solve trailing slash issue in adding supplementary sandbox domain
This commit is contained in:
parent
d13ec191cd
commit
be6c0d02b5
1 changed files with 2 additions and 4 deletions
|
@ -186,10 +186,8 @@ if ! [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
|
||||||
# so we use ${sandboxdomain%/} to remove the eccessive trailing slash # it doesnt work
|
# so we use ${sandboxdomain%/} to remove the eccessive trailing slash # it doesnt work
|
||||||
# we use jq to correct /etc/ssowat/conf.json
|
# we use jq to correct /etc/ssowat/conf.json
|
||||||
uri2=$sandboxdomain
|
uri2=$sandboxdomain
|
||||||
touch /etc/ssowat/tmp.conf.json
|
touch /etc/ssowat/conf.json.persistent
|
||||||
cat /etc/ssowat/conf.json | jq --arg uri2 "$uri2" '(.permissions[] | select(.label=="CryptPad") | .uris[1]) |=$uri2' > /etc/ssowat/tmp.conf.json
|
cat /etc/ssowat/conf.json | jq --arg uri2 "$uri2" '(.permissions[] | select(.label=="CryptPad") | .uris[1]) |=$uri2' >> /etc/ssowat/conf.json.persistent
|
||||||
ynh_secure_remove --file="/etc/ssowat/conf.json"
|
|
||||||
mv /etc/ssowat/tmp.conf.json /etc/ssowat/conf.json
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue