1 hint
="run before: remote/runit-configure nginx -- $site"
2 assert
"sudo test -f /etc/nginx/x509.d/\"$site\"/key.pem" hint
3 assert
"sudo test -f ~wiki-$site/etc/ssh/id_rsa" hint
5 sudo
install -m 664 -o www
-g www \
6 "$tool"/var
/pub
/x509
/remorque.
"$local_domainname"/crt
+ca.pem \
7 /etc
/nginx
/x509.d
/"$site"/crt.pem
9 "$tool"/local
/apt-get-install ikiwiki \
12 "$tool"/local
/adduser fcgi-
"$site" \
16 --home /home
/www
/pub
/"$site" \
19 "$tool"/local
/adduser www-
"$site" \
23 --home /home
/www
/pub
/"$site" \
26 sudo adduser fcgi-
"$site" www-
"$site"
27 sudo adduser fcgi-
"$site" wiki-
"$site"
28 #sudo adduser www-"$site"-tls www-"$site"
29 sudo
install -d -m 2770 -o wiki-
"$site" -g wiki-
"$site" \
30 /home
/lhc
/var
/ikiwiki
/remorque
32 sudo
install -d -m 2770 -o wiki-
"$site" -g wiki-
"$site" \
33 /home
/lhc
/var
/ikiwiki
/remorque
34 sudo
install -d -m 3771 -o git
-g git \
36 sudo
install -d -m 750 -o wiki-
"$site" -g git \
37 /home
/git
/hooks
/lhc
/remorque
38 sudo
install -m 771 -o git
-g git
/dev
/stdin \
39 /home
/git
/pub
/lhc
/remorque.git
/hooks
/post-update
<<-EOF
42 # The cd below is why we must use this script.
43 # The current directory may not be accessible
44 # by the user running the ikiwiki.
45 # the execution of the ikiwiki wrapper would fail with :
46 # "E: Failed to change to directory '...': Permission denied"
49 exec /home/git/hooks/lhc/remorque/post-update.ikiwiki
52 if sudo
test -d /home
/lhc
/var
/ikiwiki
/remorque
/.git
53 then sudo
-u wiki-
"$site" \
54 sh
-c 'cd /home/lhc/var/ikiwiki/remorque && git pull -v'
56 sudo
-u wiki-
"$site" \
58 git@localhost
:lhc
/remorque \
59 /home
/lhc
/var
/ikiwiki
/remorque
/git
62 /home
/lhc
/var
/ikiwiki
/remorque
/git
/.git
* \
63 /home
/lhc
/var
/ikiwiki
/remorque
/git
/* \
64 /home
/lhc
/var
/ikiwiki
/remorque
/
65 sudo
rmdir /home
/lhc
/var
/ikiwiki
/remorque
/git
68 sudo
install -m 400 -o wiki-
"$site" -g wiki-
"$site" \
69 "$tool"/etc
/nginx
/site.d
/"$site"/ikiwiki.setup \
70 /home
/lhc
/var
/ikiwiki
/remorque
/etc
/ikiwiki.setup
71 sudo adduser wiki-
"$site" www-
"$site"
72 sudo
install -d -m 2770 -o wiki-
"$site" -g fcgi-
"$site" \
73 /home
/www
/pub
/"$site"/cgi
75 sudo
-u wiki-
"$site" ikiwiki \
77 --setup /home
/lhc
/var
/ikiwiki
/remorque
/etc
/ikiwiki.setup \
80 sudo chown wiki-
"$site":www-
"$site" \
81 /home
/git
/hooks
/lhc
/remorque
/post-update.ikiwiki
83 /home
/git
/hooks
/lhc
/remorque
/post-update.ikiwiki
85 sudo
cat /etc
/gitweb
/gitweb.conf
- <<-EOF |
86 \$export_ok = "lhc-remorque-export-ok";
87 \$favicon = "/gitweb/static/git-favicon.png";
89 \$home_link_str = 'wiki';
90 \$home_text = "/etc/gitweb/lhc.home_text.html";
91 \$javascript = "/gitweb/static/gitweb.js";
92 \$logo = "/gitweb/static/git-logo.png";
93 \$my_uri = "/gitweb/";
94 \$projects_list = "/etc/gitweb/lhc-remorque.projects.list";
95 \$site_footer = "/etc/gitweb/lhc.site_footer.html";
96 \$site_header = "/etc/gitweb/lhc.site_header.html";
97 \$site_name = "remorque.$local_domainname";
98 @stylesheets = ("/gitweb/static/gitweb.css");#
100 sudo
install -m 640 -o root
-g fcgi-gitweb
/dev
/stdin \
101 /etc
/gitweb
/lhc-remorque.conf
102 sudo
install -m 640 -o root
-g fcgi-gitweb \
103 "$tool"/etc
/gitweb
/lhc.home_text.html \
104 /etc
/gitweb
/lhc.home_text.html
105 sudo
install -m 640 -o root
-g fcgi-gitweb
/dev
/stdin \
106 /etc
/gitweb
/lhc-remorque.projects.list
<<-EOF