mirror of
https://github.com/Mic92/sops-nix.git
synced 2024-12-14 11:57:52 +00:00
Allow sops-nix to be restarted when systemd is degraded
If Systemd is running, but with even a single failed unit, it'll enter Degraded state. Restart sops-nix anyway.
This commit is contained in:
parent
e2d404a7ea
commit
5876a12ff6
1 changed files with 1 additions and 1 deletions
|
@ -278,7 +278,7 @@ in {
|
|||
linux = let systemctl = config.systemd.user.systemctlPath; in ''
|
||||
systemdStatus=$(${systemctl} --user is-system-running 2>&1 || true)
|
||||
|
||||
if [[ $systemdStatus == 'running' ]]; then
|
||||
if [[ $systemdStatus == 'running' || $systemdStatus == 'degraded' ]]; then
|
||||
${systemctl} restart --user sops-nix
|
||||
else
|
||||
echo "User systemd daemon not running. Probably executed on boot where no manual start/reload is needed."
|
||||
|
|
Loading…
Reference in a new issue