aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gitolite-cgit/entrypoint.sh30
1 files changed, 16 insertions, 14 deletions
diff --git a/gitolite-cgit/entrypoint.sh b/gitolite-cgit/entrypoint.sh
index caa84fb..8b41aed 100644
--- a/gitolite-cgit/entrypoint.sh
+++ b/gitolite-cgit/entrypoint.sh
@@ -371,7 +371,8 @@ if [ ! -f /etc/nginx/http.d/cgit.conf ]; then
adduser nginx git
## Config cgit interface
- cat > /etc/cgitrc <<- EOF
+ if [ ! -f /etc/cgitrc ]; then
+ cat > /etc/cgitrc <<- EOF
#
# cgit config
#
@@ -512,20 +513,21 @@ section-from-path=1
scan-path=/var/lib/git/repositories
EOF
- # Append clone-prefix
- if [ -n "$CGIT_CLONE_PREFIX" ]; then
- echo "# Specify some default clone prefixes" >> /etc/cgitrc
- echo "clone-prefix=$CGIT_CLONE_PREFIX" >> /etc/cgitrc
- fi
+ # Append clone-prefix
+ if [ -n "$CGIT_CLONE_PREFIX" ]; then
+ echo "# Specify some default clone prefixes" >> /etc/cgitrc
+ echo "clone-prefix=$CGIT_CLONE_PREFIX" >> /etc/cgitrc
+ fi
- if [ -n "$CGIT_ROOT_TITLE" ]; then
- echo "# Set the title and heading of the repository index page" >> /etc/cgitrc
- echo "root-title=$CGIT_ROOT_TITLE" >> /etc/cgitrc
- fi
+ if [ -n "$CGIT_ROOT_TITLE" ]; then
+ echo "# Set the title and heading of the repository index page" >> /etc/cgitrc
+ echo "root-title=$CGIT_ROOT_TITLE" >> /etc/cgitrc
+ fi
- if [ -n "$CGIT_DESC" ]; then
- echo "# Set description repository" >> /etc/cgitrc
- echo "root-desc=$CGIT_DESC" >> /etc/cgitrc
+ if [ -n "$CGIT_DESC" ]; then
+ echo "# Set description repository" >> /etc/cgitrc
+ echo "root-desc=$CGIT_DESC" >> /etc/cgitrc
+ fi
fi
# Using highlight syntax
@@ -616,7 +618,7 @@ chown git:git /var/lib/git/.gitolite.rc
chmod 640 /var/lib/git/.gitolite.rc
# Start git-daemon
-git daemon --detach --reuseaddr --base-path=/var/lib/git/repositories
+#git daemon --detach --reuseaddr --base-path=/var/lib/git/repositories
# Start nginx
exec nginx -g "daemon off;"