From 52d7346588562bb3038d4a6ecffdde22627742f2 Mon Sep 17 00:00:00 2001 From: Kim Brian Ramberg Date: Sun, 8 Mar 2026 00:24:27 +0100 Subject: [PATCH] Updated start.sh to check for .env --- start.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/start.sh b/start.sh index 141d491..231828a 100755 --- a/start.sh +++ b/start.sh @@ -1,8 +1,12 @@ #!/bin/bash # Copy this file to /usr/sbin/start to enable easy startup -# cp start.sh /usr/sbin/start +# sudo cp start.sh /usr/sbin/start #docker stack deploy -c compose.yml ${PWD##*/} -env $(grep -v '^#' ${PWD}/.env | sed 's/#.*//' | xargs) docker stack deploy -c compose.yml ${PWD##*/} +if [ -f ".env" ]; then + env $(grep -v '^#' ${PWD}/.env | sed 's/#.*//' | xargs) docker stack deploy -c compose.yml ${PWD##*/} +else + docker stack deploy -c compose.yml ${PWD##*/} +fi