1 local hint
="run vm_remote nginx_configure before"
2 assert
"sudo getent passwd wiki-\"$site\" >/dev/null" hint
3 assert
"sudo test -f ~wiki-$site/etc/ssh/id_rsa" hint
5 rule apt_get_install ikiwiki \
8 rule adduser fcgi-
"$site" \
12 --home /home
/www
/pub
/"$site" \
15 rule adduser www-
"$site" \
19 --home /home
/www
/pub
/"$site" \
22 sudo adduser fcgi-
"$site" www-
"$site"
23 sudo adduser fcgi-
"$site" wiki-
"$site"
24 #sudo adduser www-"$site"-tls www-"$site"
25 sudo
install -d -m 2770 -o wiki-
"$site" -g wiki-
"$site" \
26 /home
/lhc
/var
/ikiwiki
/remorque
28 sudo
install -d -m 2770 -o wiki-
"$site" -g wiki-
"$site" \
29 /home
/lhc
/var
/ikiwiki
/remorque
30 sudo
install -d -m 2750 -o wiki-
"$site" -g git \
31 /home
/git
/hooks
/remorque
32 sudo
install -m 3771 -o git
-g git
/dev
/stdin \
33 /home
/git
/pub
/remorqueatelier.git
/hooks
/post-update
<<-EOF
36 # The cd below is why we must use this script.
37 # The current directory may not be accessible
38 # by the user running the ikiwiki.
39 # the execution of the ikiwiki wrapper would fail with :
40 # "E: Failed to change to directory '...': Permission denied"
43 exec /home/git/hooks/remorque/post-update.ikiwiki
46 if sudo
test -d /home
/lhc
/var
/ikiwiki
/remorque
/.git
47 then sudo
-u wiki-
"$site" \
48 sh
-c 'cd /home/lhc/var/ikiwiki/remorque && git pull -v'
50 sudo
-u wiki-
"$site" \
52 git@localhost
:remorqueatelier \
53 /home
/lhc
/var
/ikiwiki
/remorque
/git
56 /home
/lhc
/var
/ikiwiki
/remorque
/git
/.git
* \
57 /home
/lhc
/var
/ikiwiki
/remorque
/git
/* \
58 /home
/lhc
/var
/ikiwiki
/remorque
/
59 sudo
rmdir /home
/lhc
/var
/ikiwiki
/remorque
/git
62 sudo
install -m 400 -o wiki-
"$site" -g wiki-
"$site" \
63 "$tool"/etc
/nginx
/site.d
/"$site"/ikiwiki.setup \
64 /home
/lhc
/var
/ikiwiki
/remorque
/etc
/ikiwiki.setup
65 sudo adduser wiki-
"$site" www-
"$site"
66 sudo
install -d -m 2770 -o wiki-
"$site" -g fcgi-
"$site" \
67 /home
/www
/pub
/"$site"/cgi
69 sudo
-u wiki-
"$site" ikiwiki \
71 --setup /home
/lhc
/var
/ikiwiki
/remorque
/etc
/ikiwiki.setup \