#!/bin/sh -eux exec 2>&1 sv=${PWD#/etc/sv/} home=~git-data domainname=$(domainname) case ${domainname-} in (""|"(none)") false;; esac getent passwd fcgi-"$sv" >/dev/null || adduser fcgi-"$sv" \ --disabled-login \ --disabled-password \ --group \ --home "$home" \ --shell /bin/false \ --system adduser fcgi-"$sv" www-"$sv" adduser fcgi-"$sv" git-data install -d -m 2750 -o git -g fcgi-"$sv" \ /etc/gitweb install -m 400 -o fcgi-"$sv" -g fcgi-"$sv" /dev/stdin \ /etc/gitweb/gitweb.conf <<-EOF \$commit_oneline_message_width = 70; \$default_projects_order = 'project'; \$default_text_plain_charset = 'UTF-8'; @diff_opts = (); \$favicon = "static/git-favicon.png"; \$feature{'highlight'}{'default'} = [1]; \$git_temp = "/run/shm/tmp/gitweb"; \$home_text = "/etc/gitweb/home_text.html"; \$home_link = "/"; \$home_link_str = 'dépôts'; \$home_th_age = 'activité'; \$home_th_descr = 'description'; \$home_th_owner = 'contact'; \$home_th_project = 'dépôt'; \$javascript = "static/gitweb.js"; \$logo = "static/git-logo.png"; \$my_uri = ""; \$projectroot = "/home/git/pub"; \$projects_list = "/etc/gitweb/projects.list"; \$projects_list_description_width = 42; \$projects_list_owner_width = 15; \$search_str = "Filtre :"; \$site_footer = "/etc/gitweb/site_footer.html"; \$site_header = "/etc/gitweb/site_header.html"; \$site_name = "git.$domainname"; @stylesheets = ("static/gitweb.css");# EOF sudo install -m 400 -o fcgi-"$sv" -g fcgi-"$sv" /dev/stdin \ /etc/gitweb/home_text.html <<-EOF

Forge logicielle publique de l'Heureux Cyclage

Pour récupérer un dépôt public :

git clone git://git.heureux-cyclage.org/<projet>
EOF ln -fns \ /etc/gitweb \ ~git/etc/gitweb install -d -m 1771 -o root -g root \ /run/spawn-fcgi install -d -m 1771 -o fcgi-gitweb -g fcgi-gitweb \ /run/shm/tmp/gitweb exec /usr/bin/spawn-fcgi \ -u fcgi-"$sv" \ -g fcgi-"$sv" \ -U www-data \ -G www-data \ -M 0660 \ -n \ -s /run/spawn-fcgi/"$sv" \ -- /usr/bin/multiwatch \ --forks 3 \ -- /usr/sbin/fcgiwrap