From f994c84092fc517ffd5ff735642c145f11cd0260 Mon Sep 17 00:00:00 2001 From: gezhengqiang Date: Mon, 4 Mar 2024 17:13:34 +0800 Subject: [PATCH] feat(sgx): gramine log level support setting --- deploy/scripts/sgx/enclave_env.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/deploy/scripts/sgx/enclave_env.sh b/deploy/scripts/sgx/enclave_env.sh index b79e78424..3cfe3bcb2 100755 --- a/deploy/scripts/sgx/enclave_env.sh +++ b/deploy/scripts/sgx/enclave_env.sh @@ -70,6 +70,17 @@ elif [ -n "$PCCS_URL" ]; then sed -i "s|PCCS_URL=[^ ]*|PCCS_URL=$PCCS_URL|" /etc/sgx_default_qcnl.conf fi +if [ -n "$GRAMINE_LOG_LEVEL" ]; then + FILE="/gramine/CI-Examples/generate-token/python.manifest.template" + sed -i "/loader.log_level/ s/\"[^\"]*\"/\"$GRAMINE_LOG_LEVEL\"/" "$FILE" + # 检查sed命令是否成功执行 + if [ $? -eq 0 ]; then + echo "Log level changed to $GRAMINE_LOG_LEVEL in $FILE" + else + echo "Failed to change log level in $FILE" + fi +fi + sed -i 's/USE_SECURE_CERT=TRUE/USE_SECURE_CERT=FALSE/' /etc/sgx_default_qcnl.conf mkdir -p /data