From 53f2a6631fd77163a6bbbdae3f9c0c43e17157bf Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 16 Dec 2021 08:29:42 +0100 Subject: gkleen@sif: better rate limit ssh --- accounts/gkleen@sif/systemd.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'accounts') diff --git a/accounts/gkleen@sif/systemd.nix b/accounts/gkleen@sif/systemd.nix index c8eda9d0..a32e61b2 100644 --- a/accounts/gkleen@sif/systemd.nix +++ b/accounts/gkleen@sif/systemd.nix @@ -24,7 +24,7 @@ let pid=$! newpid="" - i=100 + i=200 while ! newpid=$(${pkgs.lsof}/bin/lsof -Pi @localhost:"''${port}" -sTCP:LISTEN -t); do if ! kill -0 "''${pid}"; then wait "''${pid}" @@ -80,14 +80,14 @@ in { NotifyAccess = "all"; WorkingDirectory = "~"; Restart = "always"; - RestartSec = "2s"; + RestartSec = "23s"; ExecStart = "${autossh-socks-script} \"%I\""; Environment = [ "SSHPASS_SECRET=gkleen@mathw0g.math.lmu.de" ]; }; Unit = { StopWhenUnneeded = true; - StartLimitInterval = "2s"; - StartLimitBurst = 5; + StartLimitInterval = "180s"; + StartLimitBurst = 7; }; }; "proxy-to-autossh-socks@8118" = { -- cgit v1.2.3