echo "secrets.conf is ENCRYPTED, skipping."; \
rm -f /tmp/nginx-staging/secrets.conf; \
fi
+ # Copy gitweb.conf if it exists
+ [ -f etc/gitweb.conf ] && cp etc/gitweb.conf /tmp/nginx-staging/
cp scripts/deploy.sh /tmp/nginx-staging/
chmod -R a+rX /tmp/nginx-staging
else
--- /dev/null
+# path to git projects (<project>.git)
+$projectroot = "/srv/git";
+
+# directory to use for temp files
+$git_temp = "/tmp";
+
+# target of the home link on top of all pages
+$home_link = $my_uri || "/";
+
+# html text to include at home page
+$home_text = "indextext.html";
+
+# file with project list; by default, simply scan the projectroot dir.
+#$projects_list = $projectroot;
+
+# stylesheet to use
+@stylesheets = ("/static/gitweb.css");
+
+# javascript code for gitweb
+$javascript = "static/gitweb.js";
+
+# logo to use
+$logo = "/static/git-logo.png";
+
+# the 'favicon'
+$favicon = "/static/git-favicon.png";
+
+# git-diff-tree(1) options to use for generated patches
+#@diff_opts = ("-M");
+
+@diff_opts = ("-M", "-C");
if sudo nginx -t; then
echo "Configuration is valid. Reloading Nginx..."
sudo nginx -s reload
+
+ # Deploy gitweb.conf if it exists in staging
+ if [ -f "$STAGING_DIR/gitweb.conf" ]; then
+ echo "Deploying gitweb.conf..."
+ # Backup existing
+ [ -f /etc/gitweb.conf ] && sudo cp /etc/gitweb.conf $BACKUP_DIR/gitweb.conf
+ sudo cp "$STAGING_DIR/gitweb.conf" /etc/gitweb.conf
+ fi
+
echo "✓ Deployment successful."
else
echo "✗ Configuration failed validation! Rolling back..."