aboutsummaryrefslogtreecommitdiff
path: root/roles/git/files/gitolite-cgit/entrypoint.sh
diff options
context:
space:
mode:
Diffstat (limited to 'roles/git/files/gitolite-cgit/entrypoint.sh')
-rwxr-xr-xroles/git/files/gitolite-cgit/entrypoint.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/roles/git/files/gitolite-cgit/entrypoint.sh b/roles/git/files/gitolite-cgit/entrypoint.sh
index 905bf97..873a0ac 100755
--- a/roles/git/files/gitolite-cgit/entrypoint.sh
+++ b/roles/git/files/gitolite-cgit/entrypoint.sh
@@ -22,9 +22,16 @@ if [ ! -f /var/lib/git/.ssh/authorized_keys ]; then
su - git -c 'gitolite setup --pubkey /tmp/admin.pub'
rm -f /tmp/admin.pub
else
+ # Fixup gitolite, eg in case a new repo was added manually.
su - git -c 'gitolite setup'
fi
+# -- SETUP: cgit ---------------------------------------------------------------
+
+# Ensure default cache directory exists.
+# Adapt if cache-root is changed in cgitrc(5).
+mkdir -p /var/cache/cgit
+
# -- SETUP: sshd ---------------------------------------------------------------
# Generate ssh host keys (nop if keys already exist).