From 38350ececd11ac9b91b688b7518869cef8a78dd7 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Fri, 15 Sep 2023 16:02:24 +0800 Subject: [PATCH] excute multiple --- docker/w9gitea/init.sh | 5 +++++ docker/w9gitea/init/run | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker/w9gitea/init.sh b/docker/w9gitea/init.sh index fe03252c..d3c4429c 100644 --- a/docker/w9gitea/init.sh +++ b/docker/w9gitea/init.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [ -e "/credential" ]; then + echo "File /credential exists. Exiting script." + exit 1 +fi + # Create admin credential by admin cli su -c ' gitea admin user create --admin --username websoft9 --random-password --email help@websoft9.com > /tmp/credential diff --git a/docker/w9gitea/init/run b/docker/w9gitea/init/run index 60cd101f..8ccdda85 100644 --- a/docker/w9gitea/init/run +++ b/docker/w9gitea/init/run @@ -3,8 +3,5 @@ s6-svwait -u /etc/s6/gitea pushd /root >/dev/null -exec 2>&1 exec /usr/local/bin/init.sh -echo "init.sh has been executed" > /var/run/init.sh.executed -wait popd