forked from Fediversity/Fediversity
mv sshopts
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
This commit is contained in:
parent
8113ec70ce
commit
a8d8da4e0d
3 changed files with 3 additions and 9 deletions
|
@ -10,10 +10,7 @@ let
|
||||||
inherit pathToRoot pathFromRoot;
|
inherit pathToRoot pathFromRoot;
|
||||||
nodeName = "ssh";
|
nodeName = "ssh";
|
||||||
targetSystem = system;
|
targetSystem = system;
|
||||||
sshOpts = [
|
sshOpts = [ ];
|
||||||
"ConnectTimeout=1"
|
|
||||||
"ServerAliveInterval=1"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
deploy =
|
deploy =
|
||||||
(import ../common/data-model.nix {
|
(import ../common/data-model.nix {
|
||||||
|
|
|
@ -10,10 +10,7 @@ let
|
||||||
inherit pathToRoot pathFromRoot;
|
inherit pathToRoot pathFromRoot;
|
||||||
nodeName = "target";
|
nodeName = "target";
|
||||||
targetSystem = system;
|
targetSystem = system;
|
||||||
sshOpts = [
|
sshOpts = [ ];
|
||||||
"ConnectTimeout=1"
|
|
||||||
"ServerAliveInterval=1"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
deploy =
|
deploy =
|
||||||
(import ../common/data-model.nix {
|
(import ../common/data-model.nix {
|
||||||
|
|
|
@ -39,7 +39,7 @@ NIX_SSHOPTS="${sshOpts[*]}" nix-copy-closure --to "$destination" "$outPath" --gz
|
||||||
# shellcheck disable=SC2029
|
# shellcheck disable=SC2029
|
||||||
ssh "${sshOpts[@]}" "$destination" "nix-env --profile /nix/var/nix/profiles/system --set $outPath"
|
ssh "${sshOpts[@]}" "$destination" "nix-env --profile /nix/var/nix/profiles/system --set $outPath"
|
||||||
# shellcheck disable=SC2029
|
# shellcheck disable=SC2029
|
||||||
output=$(ssh "${sshOpts[@]}" "$destination" "nohup $outPath/bin/switch-to-configuration switch &" 2>&1) || echo "status code: $?"
|
output=$(ssh -o "ConnectTimeout=1" -o "ServerAliveInterval=1" "${sshOpts[@]}" "$destination" "nohup $outPath/bin/switch-to-configuration switch &" 2>&1) || echo "status code: $?"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
if [[ $output != *"Timeout, server $host not responding"* ]]; then
|
if [[ $output != *"Timeout, server $host not responding"* ]]; then
|
||||||
echo "non-timeout error: $output"
|
echo "non-timeout error: $output"
|
||||||
|
|
Loading…
Add table
Reference in a new issue