sulu: Fix runtime config update

This commit is contained in:
Vivek Kumar Dutta 2023-08-21 11:30:03 +05:30
parent 885ace494e
commit a4b6d1c15d
No known key found for this signature in database
GPG key ID: 65C818099F37097D
2 changed files with 4 additions and 4 deletions

View file

@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-builder
PKG_VERSION:=3.0.1
PKG_VERSION:=3.0.2
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git

View file

@ -169,12 +169,12 @@ function set_sulu_connection_mode()
SCONFIG="$(_get_sulu_connection_config)"
rbac="${1}"
profile="$(jq '.Current-connection' ${SCONFIG})"
profile="$(jq '."Current-connection"' ${SCONFIG})"
if [ "$rbac" -eq "1" -a "${profile}" == "\"main\"" ]; then
config="$(jq '.Current-connection = "rbac"' ${SCONFIG})"
config="$(jq '."Current-connection" = "rbac"' ${SCONFIG})"
echo "${config}" > ${SCONFIG}
elif [ "$rbac" -eq "0" -a "${profile}" == "\"rbac\"" ]; then
config="$(jq '.Current-connection = "main"' ${SCONFIG})"
config="$(jq '."Current-connection" = "main"' ${SCONFIG})"
echo "${config}" > ${SCONFIG}
fi
}