From 9417594ca53bee44106b319b9b78153aed520593 Mon Sep 17 00:00:00 2001 From: Snogard Date: Sat, 8 Jul 2023 11:48:34 +0200 Subject: [PATCH] updated some scripts --- src/commands/install/install-gitlab-runner.sh | 9 +++++---- src/commands/update.sh | 7 +++++++ src/libs/bash/envs.sh | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/commands/install/install-gitlab-runner.sh b/src/commands/install/install-gitlab-runner.sh index a2fb9f5..c64b9d2 100644 --- a/src/commands/install/install-gitlab-runner.sh +++ b/src/commands/install/install-gitlab-runner.sh @@ -1,16 +1,17 @@ #!/bin/baash source /opt/kaido/src/libs/bash/lib.sh -option=$1 -token=$2 +userID=$1 +option=$2 +token=$3 # setup imageName=docker.io/gitlab/gitlab-runner:alpine3.18-v16.1.0 containerName=gitlab-runner architecture=$(arch) -srcFolder=/mnt/storage/containers/$containerName/ -srcSock=/var/run/user/1001/podman/podman.sock +srcFolder=$CONTAINERS_FOLDER/$containerName/ +srcSock=/var/run/user/$userID/podman/podman.sock # pre install create_folder $srcFolder diff --git a/src/commands/update.sh b/src/commands/update.sh index 97b079b..ce36e62 100755 --- a/src/commands/update.sh +++ b/src/commands/update.sh @@ -1,4 +1,5 @@ #!/bin/bash +source "src/commands/install/install-gitlab-runner.sh" # variables root=/opt/kaido @@ -28,6 +29,12 @@ if [ ! -d "${workdir}" ]; then fi # ---------------------- + +if [ -d "$MASTER_CONFIG_FOLDER" ]; then + cd "$MASTER_CONFIG_FOLDER" + git pull +fi + # read config files installList=$(cat ${updateConfig} | grep -i install-) configureList=$(cat ${updateConfig} | grep -i configure-) diff --git a/src/libs/bash/envs.sh b/src/libs/bash/envs.sh index 8095adb..f95f2c1 100644 --- a/src/libs/bash/envs.sh +++ b/src/libs/bash/envs.sh @@ -1,3 +1,3 @@ #TODO: make envs configurable CONTAINERS_FOLDER="/mnt/storage/containers" -MASTER_CONFIG_FOLDER="/opt/kaido/configuration" \ No newline at end of file +MASTER_CONFIG_FOLDER="$HOME/.config/kaido" \ No newline at end of file