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
/wiki.cyclocoop.org
/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
/data
/"$site" \
19 "$tool"/local
/adduser www-
"$site" \
23 --home /home
/www
/data
/"$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
/cyclo
/var
/ikiwiki
/"$site"
31 sudo
install -d -m 3771 -o git
-g git \
33 sudo
install -d -m 750 -o wiki-
"$site" -g git \
34 /home
/git
/hooks
/cyclo
/"$site"
35 sudo
install -m 771 -o git
-g git
/dev
/stdin \
36 /home
/git
/data
/cyclowiki.git
/hooks
/post-update
<<-EOF
39 # The cd below is why we must use this script.
40 # The current directory may not be accessible
41 # by the user running the ikiwiki.
42 # the execution of the ikiwiki wrapper would fail with :
43 # "E: Failed to change to directory '...': Permission denied"
46 exec /home/git/hooks/cyclo/$site/post-update.ikiwiki
49 if sudo
test -d /home
/cyclo
/var
/ikiwiki
/"$site"/src
/.git
50 then sudo
-u wiki-
"$site" sh
-$
-c \
51 'cd /home/cyclo/var/ikiwiki/'"'$site'"'/src &&
53 git submodule update --recursive --init'
55 sudo
-u wiki-
"$site" git clone \
56 git@localhost
:cyclowiki \
57 /home
/cyclo
/var
/ikiwiki
/"$site"/src
58 sudo
-u wiki-
"$site" sh
-$
-c \
59 'cd /home/cyclo/var/ikiwiki/'"'$site'"'/src &&
60 git submodule update --recursive --init'
63 sudo adduser wiki-
"$site" www-
"$site"
64 sudo
install -d -m 2770 -o wiki-
"$site" -g fcgi-
"$site" \
65 /home
/www
/data
/"$site"/cgi
67 sudo
-u wiki-
"$site" ikiwiki \
69 --setup /home
/cyclo
/var
/ikiwiki
/"$site"/src
/ikiwiki.setup \
72 sudo chown wiki-
"$site":www-
"$site" \
73 /home
/git
/hooks
/cyclo
/"$site"/post-update.ikiwiki
75 /home
/git
/hooks
/cyclo
/"$site"/post-update.ikiwiki
77 /home
/cyclo
/var
/ikiwiki
/"$site"/src
/.ikiwiki
79 sudo
cat /etc
/gitweb
/gitweb.conf
- <<-EOF |
80 \$export_ok = "cyclo-wiki-export-ok";
81 \$favicon = "/gitweb/static/git-favicon.png";
83 \$home_link_str = 'wiki';
84 \$home_text = "/etc/gitweb/cyclo.home_text.html";
85 \$javascript = "/gitweb/static/gitweb.js";
86 \$logo = "/gitweb/static/git-logo.png";
87 \$my_uri = "/gitweb/";
88 \$my_url = "/gitweb/";
89 \$projects_list = "/etc/gitweb/cyclo-wiki.projects.list";
90 \$site_footer = "/etc/gitweb/cyclo.site_footer.html";
91 \$site_header = "/etc/gitweb/cyclo.site_header.html";
92 \$site_name = "wiki.cyclocoop.org";
93 @stylesheets = ("/gitweb/static/gitweb.css");#
95 sudo
install -m 640 -o root
-g fcgi-gitweb
/dev
/stdin \
96 /etc
/gitweb
/cyclo-wiki.conf
97 sudo
install -m 640 -o root
-g fcgi-gitweb \
98 "$tool"/etc
/gitweb
/cyclo.home_text.html \
99 /etc
/gitweb
/cyclo.home_text.html
100 sudo
install -m 640 -o root
-g fcgi-gitweb
/dev
/stdin \
101 /etc
/gitweb
/cyclo-wiki.projects.list
<<-EOF