Correction : vm_remote : uniformise rule_runit_configure avec vm_hosted .
[lhc/ateliers.git] / etc / nginx / site.d / lhc-remorque / configure.sh
index 8e07c61..1bf5045 100644 (file)
@@ -1,4 +1,4 @@
-local hint="run vm_remote nginx_configure before"
+local hint="run before: ./vm_remote runit_configure nginx -- $site"
 assert "sudo getent passwd wiki-\"$site\" >/dev/null" hint
 assert "sudo test -f ~wiki-$site/etc/ssh/id_rsa" hint
 
@@ -28,9 +28,10 @@ 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/remorque
-sudo install -m 3771 -o git -g git /dev/stdin \
- /home/git/pub/remorqueatelier.git/hooks/post-update <<-EOF
+ /home/git/hooks/lhc \
+ /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
        #!/bin/sh -efux
        
        # The cd below is why we must use this script.
@@ -40,7 +41,7 @@ sudo install -m 3771 -o git -g git /dev/stdin \
        # "E: Failed to change to directory '...': Permission denied"
        cd /
        
-       exec /home/git/hooks/remorque/post-update.ikiwiki
+       exec /home/git/hooks/lhc/remorque/post-update.ikiwiki
        EOF
 
 if sudo test -d /home/lhc/var/ikiwiki/remorque/.git
@@ -49,7 +50,7 @@ if sudo test -d /home/lhc/var/ikiwiki/remorque/.git
  else
        sudo -u wiki-"$site" \
                git clone \
-                git@localhost:remorqueatelier \
+                git@localhost:lhc/remorque \
                 /home/lhc/var/ikiwiki/remorque/git
        set +f
        sudo mv -i \