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