X-Git-Url: http://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=etc%2Fnginx%2Fsite.d%2Flhc-remorque%2Flocal.sh;h=9ec7bdb04fe3c1d0994482c9c9e3245a232cb667;hp=0824349a96ac5bff34c5a0c5f7b81afd83173058;hb=41902057ecac8fa4dbe7d140a87ac220e3302bf1;hpb=48df63a68373f2e9025075115d16d3faad474aa9 diff --git a/etc/nginx/site.d/lhc-remorque/local.sh b/etc/nginx/site.d/lhc-remorque/local.sh index 0824349..9ec7bdb 100644 --- a/etc/nginx/site.d/lhc-remorque/local.sh +++ b/etc/nginx/site.d/lhc-remorque/local.sh @@ -2,6 +2,10 @@ hint="run before: remote/runit-configure nginx -- $site" assert "sudo test -f /etc/nginx/x509.d/\"$site\"/key.pem" hint assert "sudo test -f ~wiki-$site/etc/ssh/id_rsa" hint +sudo install -m 664 -o www -g www \ + "$tool"/var/pub/x509/remorque."$local_domainname"/crt+ca.pem \ + /etc/nginx/x509.d/"$site"/crt.pem + "$tool"/local/apt-get-install ikiwiki \ libsearch-xapian-perl @@ -27,8 +31,9 @@ sudo install -d -m 2770 -o wiki-"$site" -g wiki-"$site" \ sudo install -d -m 2770 -o wiki-"$site" -g wiki-"$site" \ /home/lhc/var/ikiwiki/remorque -sudo install -d -m 2750 -o wiki-"$site" -g git \ - /home/git/hooks/lhc \ +sudo install -d -m 3771 -o git -g git \ + /home/git/hooks/lhc +sudo install -d -m 750 -o wiki-"$site" -g git \ /home/git/hooks/lhc/remorque sudo install -m 771 -o git -g git /dev/stdin \ /home/git/pub/lhc/remorque.git/hooks/post-update <<-EOF @@ -72,3 +77,32 @@ sudo -u wiki-"$site" ikiwiki \ --setup /home/lhc/var/ikiwiki/remorque/etc/ikiwiki.setup \ --refresh \ --wrappers +sudo chown wiki-"$site":www-"$site" \ + /home/git/hooks/lhc/remorque/post-update.ikiwiki +sudo chmod 6755 \ + /home/git/hooks/lhc/remorque/post-update.ikiwiki + +sudo cat /etc/gitweb/gitweb.conf - <<-EOF | + \$export_ok = "lhc-remorque-export-ok"; + \$favicon = "/gitweb/static/git-favicon.png"; + \$home_link = "/"; + \$home_link_str = 'wiki'; + \$home_text = "/etc/gitweb/lhc.home_text.html"; + \$javascript = "/gitweb/static/gitweb.js"; + \$logo = "/gitweb/static/git-logo.png"; + \$my_uri = "/gitweb/"; + \$projects_list = "/etc/gitweb/lhc-remorque.projects.list"; + \$site_footer = "/etc/gitweb/lhc.site_footer.html"; + \$site_header = "/etc/gitweb/lhc.site_header.html"; + \$site_name = "remorque.$local_domainname"; + @stylesheets = ("/gitweb/static/gitweb.css");# + EOF +sudo install -m 640 -o root -g fcgi-gitweb /dev/stdin \ + /etc/gitweb/lhc-remorque.conf +sudo install -m 640 -o root -g fcgi-gitweb \ + "$tool"/etc/gitweb/lhc.home_text.html \ + /etc/gitweb/lhc.home_text.html +sudo install -m 640 -o root -g fcgi-gitweb /dev/stdin \ + /etc/gitweb/lhc-remorque.projects.list <<-EOF + lhc/remorque.git + EOF