Make tunnel more robust to failures
This commit is contained in:
parent
19a759245d
commit
7f41f01ecd
1 changed files with 2 additions and 0 deletions
|
@ -13,6 +13,8 @@
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
script = "${pkgs.openssh}/bin/ssh -i ${config.age.secrets."files/services/tunnel/key".path} -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o ControlPath=none -NT -p $SSH_PORT -L 0.0.0.0:9797:$CONN_HOST:$CONN_PORT $USER@$SSH_HOST";
|
script = "${pkgs.openssh}/bin/ssh -i ${config.age.secrets."files/services/tunnel/key".path} -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o ControlPath=none -NT -p $SSH_PORT -L 0.0.0.0:9797:$CONN_HOST:$CONN_PORT $USER@$SSH_HOST";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
RestartSec = "5s";
|
||||||
|
Restart = "on-failure";
|
||||||
EnvironmentFile = config.age.secrets."files/services/tunnel/env".path;
|
EnvironmentFile = config.age.secrets."files/services/tunnel/env".path;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue