aboutsummaryrefslogtreecommitdiff
path: root/services/docker/git-server/app/lighttpd-wrapper.bash
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-03-09 17:31:21 +0800
committerYuqian Yang <crupest@crupest.life>2025-03-09 18:46:54 +0800
commitac7c3e0ab3b460a5a96df04496e6f310ef9572d0 (patch)
tree712d9f164db7623498a97b3778e2322c5d4a9752 /services/docker/git-server/app/lighttpd-wrapper.bash
parent4915c92a8ff30439676cb328864acab050538f37 (diff)
downloadcrupest-ac7c3e0ab3b460a5a96df04496e6f310ef9572d0.tar.gz
crupest-ac7c3e0ab3b460a5a96df04496e6f310ef9572d0.tar.bz2
crupest-ac7c3e0ab3b460a5a96df04496e6f310ef9572d0.zip
feat(service): mv config to docker imagei, better pri/pub git.
Diffstat (limited to 'services/docker/git-server/app/lighttpd-wrapper.bash')
-rwxr-xr-xservices/docker/git-server/app/lighttpd-wrapper.bash10
1 files changed, 8 insertions, 2 deletions
diff --git a/services/docker/git-server/app/lighttpd-wrapper.bash b/services/docker/git-server/app/lighttpd-wrapper.bash
index 54079ad..70055e7 100755
--- a/services/docker/git-server/app/lighttpd-wrapper.bash
+++ b/services/docker/git-server/app/lighttpd-wrapper.bash
@@ -1,8 +1,14 @@
#!/usr/bin/bash
-set -e
+set -e -o pipefail
-[[ -f /git/user-info ]] || touch -a /git/user-info
+die() {
+ echo "$@" >&2
+ exit 1
+}
+
+[[ -n "$CRUPEST_ROOT_URL" ]] || die "CRUPEST_ROOT_URL is not set. It is needed to create clone url of repos."
+[[ -f /git/user-info ]] || touch -a /git/user-info || die "Failed to create /git/user-info to save user accounts. Permission problem?"
exec 3>&1
exec 4>&1