X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=vm_remote;h=0a7ef55389ad4c7cae45456c2964b91b2d8eec2c;hp=c167f30adaec6a761e73e8f0bc08993d316546d5;hb=3e8f7fa8b58506dcb6b632855cfdb7da3b2b7ead;hpb=2d48a198262604098443c6a90e58b0084600a4d7 diff --git a/vm_remote b/vm_remote index c167f30..0a7ef55 100755 --- a/vm_remote +++ b/vm_remote @@ -1,6 +1,6 @@ #!/bin/sh set -e -f ${DRY_RUN:+-n} -u -tool=$(cd "${0%/*}"; cd -) +tool=$(readlink -e "${0%/*}") . "$tool"/lib/rule.sh . "$tool"/etc/vm.sh @@ -27,10 +27,10 @@ rule_git_configure () { # DESCRIPTION: configure ./.git correctement ( cd "$tool" git remote rm host || true - git remote add host $vm_host:tool/vm + git remote add host $vm_host:src/vm git config --replace remote.host.push HEAD:refs/remotes/master git remote rm hosted || true - git remote add hosted root@$vm_fqdn:tool/vm + git remote add hosted $vm_fqdn:src/vm git config --replace remote.hosted.push HEAD:refs/remotes/master git submodule update --init ) @@ -98,7 +98,7 @@ rule_apache2_key_send () { do conf=${conf#"$tool"/etc/nginx/site.d/} local site=${conf%/key_send} rule _x509_site_key_decrypt \ - "$(cat "$tool"/etc/apache2/site.d/"$site"/key_send)" | + "$(cat "$tool"/etc/apache2/site.d/"$site"/x509_host)" | rule ssh -l root ' \ sudo install -d -m 770 -o '"$user"' -g '"$user"' \ /etc/apache2 \ @@ -130,7 +130,7 @@ rule_dovecot_key_send () { /etc/dovecot/"$vm_domainname"/imap/x509/key.pem ' } -rule_gitolite_configure () { +rule_gitolite_git () { ( cd "$tool"/etc/gitolite GIT_SSH=../../lib/ssh \ @@ -138,29 +138,33 @@ rule_gitolite_configure () { SSH_ASKPASS='"$tool"'/lib/ssh-pass \ SSH_ID=git \ ssh-add '"$tool"'/var/sec/ssh/git