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 \
11 libsearch-xapian-perl \
15 #"$tool"/local/adduser fcgi-"$site" \
17 # --disabled-password \
19 # --home /home/cyclo/var/ikiwiki/'"'$site'"' \
20 # --shell /bin/false \
22 "$tool"/local
/adduser www-
"$site" \
26 --home /home
/www
/data
/"$site" \
29 #sudo adduser fcgi-"$site" www-"$site"
30 #sudo adduser fcgi-"$site" wiki-"$site"
31 #sudo adduser www-"$site"-tls www-"$site"
32 sudo
install -d -m 2770 -o wiki-
"$site" -g wiki-
"$site" \
33 /home
/cyclo
/var
/ikiwiki
/"$site"
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
/cyclo
/"$site"
38 sudo
install -m 771 -o git
-g git
/dev
/stdin \
39 /home
/git
/data
/cyclowiki.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/cyclo/$site/post-update.ikiwiki
52 if sudo
test -d /home
/cyclo
/var
/ikiwiki
/"$site"/src
/.git
53 then sudo
-u wiki-
"$site" sh
-$
-c ' \
54 cd /home/cyclo/var/ikiwiki/'"'$site'"'/src &&
56 git submodule update --recursive --init'
58 sudo
-u wiki-
"$site" sh
-$
-c ' \
61 git@localhost:cyclowiki \
62 /home/cyclo/var/ikiwiki/'"'$site'"'/src &&
63 cd /home/cyclo/var/ikiwiki/'"'$site'"'/src &&
64 git config core.sharedRepository group &&
65 git submodule update --recursive --init
69 sudo adduser wiki-
"$site" www-
"$site"
70 sudo
install -d -m 2770 -o wiki-
"$site" -g wiki-
"$site" \
71 /home
/www
/data
/"$site"/cgi
73 sudo
-u wiki-
"$site" ikiwiki \
75 --setup /home
/cyclo
/var
/ikiwiki
/"$site"/src
/ikiwiki.setup \
78 sudo chown wiki-
"$site":www-
"$site" \
79 /home
/git
/hooks
/cyclo
/"$site"/post-update.ikiwiki
81 /home
/git
/hooks
/cyclo
/"$site"/post-update.ikiwiki
83 /home
/cyclo
/var
/ikiwiki
/"$site"/src
/.ikiwiki \
84 /home
/cyclo
/var
/ikiwiki
/"$site"/src
/.ikiwiki
/xapian
/default
85 sudo
install -m 664 -o wiki-
"$site" -g wiki-
"$site" /dev
/stdin \
86 /home
/cyclo
/var
/ikiwiki
/"$site"/src
/.ikiwiki
/xapian
/omega.conf
<<-EOF
88 template_dir ./templates
91 sudo
cat /etc
/gitweb
/gitweb.conf
- <<-EOF |
92 \$export_ok = "cyclo-wiki-export-ok";
93 \$favicon = "/gitweb/static/git-favicon.png";
95 \$home_link_str = 'wiki';
96 \$home_text = "/etc/gitweb/cyclo.home_text.html";
97 \$javascript = "/gitweb/static/gitweb.js";
98 \$logo = "/gitweb/static/git-logo.png";
99 \$my_uri = "/gitweb/";
100 \$my_url = "/gitweb/";
101 \$projects_list = "/etc/gitweb/cyclo-wiki.projects.list";
102 \$site_footer = "/etc/gitweb/cyclo.site_footer.html";
103 \$site_header = "/etc/gitweb/cyclo.site_header.html";
104 \$site_name = "wiki.cyclocoop.org";
105 @stylesheets = ("/gitweb/static/gitweb.css");#
107 sudo
install -m 640 -o root
-g fcgi-gitweb
/dev
/stdin \
108 /etc
/gitweb
/cyclo-wiki.conf
109 sudo
install -m 640 -o root
-g fcgi-gitweb \
110 "$tool"/etc
/gitweb
/cyclo.home_text.html \
111 /etc
/gitweb
/cyclo.home_text.html
112 sudo
install -m 640 -o root
-g fcgi-gitweb
/dev
/stdin \
113 /etc
/gitweb
/cyclo-wiki.projects.list
<<-EOF