From 97f767f1df437227cb1548b8cb962c7c99386c7a Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Thu, 11 Sep 2025 00:36:46 -0700 Subject: [PATCH] Update init.sh --- init.sh | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/init.sh b/init.sh index 1641259..bbf3dc5 100644 --- a/init.sh +++ b/init.sh @@ -1,35 +1,9 @@ #!/usr/bin/env sh set -eu -mkdir -p /data/gitea/conf /data/gitea/custom /data/custom /data/caddy - -# Bootstrap Gitea +mkdir -p /data/gitea/conf /data/gitea/custom if [ ! -f /data/.bootstrapped ]; then /usr/local/bin/gitea migrate - /usr/local/bin/gitea admin user create --admin \ - --username "${GITEA_ADMIN_USER}" \ - --password "${GITEA_ADMIN_PASSWD}" \ - --email "${GITEA_ADMIN_EMAIL}" || true + /usr/local/bin/gitea admin user create --admin --username "${GITEA_ADMIN_USER}" --password "${GITEA_ADMIN_PASSWD}" --email "${GITEA_ADMIN_EMAIL}" || true touch /data/.bootstrapped fi - -# Pull Gitea customizations -if [ -n "${CUSTOM_REPO_URL:-}" ]; then - if [ ! -d /data/custom/.git ]; then - git clone --depth 1 "${CUSTOM_REPO_URL}" /data/custom || true - else - git -C /data/custom pull --ff-only || true - fi - rsync -a --delete /data/custom/ /data/gitea/custom/ -fi - -# Pull Caddy config -if [ -n "${CADDY_REPO_URL:-}" ]; then - if [ ! -d /data/caddyrepo/.git ]; then - git clone --depth 1 "${CADDY_REPO_URL}" /data/caddyrepo || true - else - git -C /data/caddyrepo pull --ff-only || true - fi - if [ -f "/data/caddyrepo/Caddyfile" ]; then - cp "/data/caddyrepo/Caddyfile" /data/caddy/Caddyfile - fi -fi +exec /usr/local/bin/gitea