From be1adab95d8584624e448dbb8ba9925bb08a36f2 Mon Sep 17 00:00:00 2001 From: QYG2297248353 Date: Mon, 2 Dec 2024 09:09:13 +0000 Subject: [PATCH] Processed apps directory via GitHub Actions --- appstore/topiam-ce/2.0.0/scripts/init.sh | 15 ++++++++++++++- appstore/topiam-ce/2.0.0/scripts/uninstall.sh | 10 ++++++++++ appstore/topiam-ce/2.0.0/scripts/upgrade.sh | 17 +++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 appstore/topiam-ce/2.0.0/scripts/uninstall.sh create mode 100644 appstore/topiam-ce/2.0.0/scripts/upgrade.sh diff --git a/appstore/topiam-ce/2.0.0/scripts/init.sh b/appstore/topiam-ce/2.0.0/scripts/init.sh index 2d5a8efc..07fb8c3f 100644 --- a/appstore/topiam-ce/2.0.0/scripts/init.sh +++ b/appstore/topiam-ce/2.0.0/scripts/init.sh @@ -1,4 +1,17 @@ #!/bin/bash -chown -R 1001:1001 data/logs +if [ -f .env ]; then + source .env + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/appstore/topiam-ce/2.0.0/scripts/uninstall.sh b/appstore/topiam-ce/2.0.0/scripts/uninstall.sh new file mode 100644 index 00000000..c86c4fbc --- /dev/null +++ b/appstore/topiam-ce/2.0.0/scripts/uninstall.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/appstore/topiam-ce/2.0.0/scripts/upgrade.sh b/appstore/topiam-ce/2.0.0/scripts/upgrade.sh new file mode 100644 index 00000000..07fb8c3f --- /dev/null +++ b/appstore/topiam-ce/2.0.0/scripts/upgrade.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi