From 2806a8b2ed31b30ff4392d14b1a361fc1a921584 Mon Sep 17 00:00:00 2001 From: Snogard Date: Wed, 5 Mar 2025 12:41:22 +0100 Subject: [PATCH] moved install templates to the proper folder --- src/templates/{ => install}/install-container.sh | 7 +++++++ src/templates/{ => install}/install-pod.sh | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) rename src/templates/{ => install}/install-container.sh (78%) rename src/templates/{ => install}/install-pod.sh (91%) diff --git a/src/templates/install-container.sh b/src/templates/install/install-container.sh similarity index 78% rename from src/templates/install-container.sh rename to src/templates/install/install-container.sh index aeb448b..452008f 100644 --- a/src/templates/install-container.sh +++ b/src/templates/install/install-container.sh @@ -5,6 +5,8 @@ source /opt/kaido/src/libs/bash/lib.sh imageName=docker.io/ containerName= +envFile="$KAIDO_CONFIG_FOLDER/containers/$podName/$containerName.env" + dstBasePath="$KAIDO_CONTAINER_FOLDER/$containerName" # envs @@ -14,6 +16,10 @@ if [ -f "$KAIDO_CONFIG_FOLDER/containers/$containerName/envs.sh" ]; then fi +if [ ! -f "$envFile" ]; then + envFile="$KAIDO_EMPTY_ENV_FILE" +fi + # pre install create_folder "$dstBasePath" stop_and_remove_container $containerName @@ -24,6 +30,7 @@ echo "Creating new container" podman create \ --name $containerName \ -v $dstBasePath:/path/to/folder \ + --env-file="$envFile" \ $imageName diff --git a/src/templates/install-pod.sh b/src/templates/install/install-pod.sh similarity index 91% rename from src/templates/install-pod.sh rename to src/templates/install/install-pod.sh index 8ce86fa..57b65b7 100644 --- a/src/templates/install-pod.sh +++ b/src/templates/install/install-pod.sh @@ -46,5 +46,5 @@ podman create \ $imageName_web # systemd -create_systemd_services $containerName -systemctl --user enable --now $containerName \ No newline at end of file +create_systemd_services $podName +systemctl --user enable --now $podName \ No newline at end of file