Fixed the startup script (again)

This commit is contained in:
2026-01-13 21:37:52 +01:00
parent d69cfc9f99
commit ee7d40c4e3
2 changed files with 17 additions and 14 deletions

View File

@@ -1,10 +1,13 @@
#!/bin/sh
# Check if Git repo needs updating
# Construct the Git URL - strip https:// if present in GIT_REPO_URL
CLEAN_REPO_URL=$(echo "${GIT_REPO_URL}" | sed 's|^https://||')
if [ -d .git ]; then
echo "Pulling latest changes from the repository..."
git pull "https://${GIT_USERNAME}:${GIT_PAT}@${GIT_REPO_URL}" "${GIT_BRANCH}" || true
git pull "https://${GIT_USERNAME}:${GIT_PAT}@${CLEAN_REPO_URL}" "${GIT_BRANCH}" || true
fi
# Constants
EXTENSIONS="yml json conf properties" # Space-separated list of extensions
ENV="production" # Change this to the environment you need