proton-pass-agent: retry systemd service instead of hitting start limit

The agent exits as long as no valid pass-cli session exists. With the
default start rate limit systemd stopped restarting it after a few
attempts, leaving the unit dead until it was restarted manually. Disable
the rate limit and retry every 10 seconds so the agent starts on its own
after 'pass-cli login'.
This commit is contained in:
Thierry Delafontaine
2026-10-04 16:42:08 +13:00
committed by Austin Horstman
parent 7e1b482b1e
commit fc0923ff94
3 changed files with 9 additions and 0 deletions

View File

@@ -94,10 +94,15 @@ in
Unit = {
Description = "Proton Pass SSH agent";
Documentation = "https://protonpass.github.io/pass-cli/commands/ssh-agent/#ssh-agent-integration";
# Retry forever: the agent exits as long as `pass-cli login` has not
# been run, which would otherwise exhaust systemd's start rate limit
# and leave the unit dead until it is restarted manually.
StartLimitIntervalSec = 0;
};
Service = {
ExecStart = lib.concatStringsSep " " cmd;
Restart = "on-failure";
RestartSec = 10;
KeyringMode = "shared";
};
};

View File

@@ -5,7 +5,9 @@ WantedBy=default.target
ExecStart=@proton-pass-cli@/bin/pass-cli ssh-agent start --socket-path %t/proton-pass-agent/socket
KeyringMode=shared
Restart=on-failure
RestartSec=10
[Unit]
Description=Proton Pass SSH agent
Documentation=https://protonpass.github.io/pass-cli/commands/ssh-agent/#ssh-agent-integration
StartLimitIntervalSec=0

View File

@@ -5,7 +5,9 @@ WantedBy=default.target
ExecStart=@proton-pass-cli@/bin/pass-cli ssh-agent start --socket-path %t/proton-pass-agent/socket --share-id 123456789 --vault-name MySshKeyVault --refresh-interval 7200 --create-new-identities MySshKeyVault
KeyringMode=shared
Restart=on-failure
RestartSec=10
[Unit]
Description=Proton Pass SSH agent
Documentation=https://protonpass.github.io/pass-cli/commands/ssh-agent/#ssh-agent-integration
StartLimitIntervalSec=0