X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=vm_remote;h=8fe05610ddbd7832b113319595ec92aab70f0b02;hb=3bbe34c1a2b6303f74a1d70454416d65cfec30f2;hp=9b37839800975501713c515d4b7b8169e900974d;hpb=910b5358868be624ddf79e5c8e8dd46b0d403b4b;p=lhc%2Fateliers.git diff --git a/vm_remote b/vm_remote index 9b37839..8fe0561 100755 --- a/vm_remote +++ b/vm_remote @@ -10,7 +10,8 @@ rule_help () { # SYNTAX: [--hidden] DESCRIPTION: ce script regroupe des règles pour administrer la VM ($vm_fqdn) _depuis_ une machine distante ; - il sert à la fois d'outil et de documentation. + il sert à la fois d'outil (aisément bidouillable) + et de documentation (préçise). Voir \`$tool/vm_host' pour les règles côté machine hôte ($vm_host). Voir \`$tool/vm_hosted' pour les règles côté VM hébergée ($vm_fqdn). SYNTAX: $0 \$RULE \${RULE}_SYNTAX @@ -27,10 +28,10 @@ rule_git_config () { # DESCRIPTION: configure le .git local pour bien pousser cd "$tool" git remote rm host || true git remote add host $vm_host:tool/vm - git config --replace remote.host.push HEAD:refs/heads/origin + 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 config --replace remote.hosted.push HEAD:refs/heads/origin + git config --replace remote.hosted.push HEAD:refs/remotes/master ) } rule_git_push () { # SYNTAX: {host|hosted} $git_push_options @@ -41,6 +42,9 @@ rule_git_push () { # SYNTAX: {host|hosted} $git_push_options rule_ssh () { "$tool"/vm_ssh $vm_fqdn "$@" } +rule_mosh () { + mosh --ssh="$tool/vm_ssh $*" $vm_fqdn + } rule__ssh_known_hosts_update () { rule ssh \ -o StrictHostKeyChecking=no \