diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-12 13:48:41 +0100 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-12 13:48:41 +0100 |
| commit | ff32ceaae000fbc44eb54bd01fe4b7bd77995b37 (patch) | |
| tree | fb313ee2003da177704ba10c3da9bb7414f22935 /system-profiles/openssh/known-hosts/expiration.gup | |
| parent | a7c15eb497d95f04e36ab90d84c37cdde71c8e0e (diff) | |
| download | nixos-ff32ceaae000fbc44eb54bd01fe4b7bd77995b37.tar nixos-ff32ceaae000fbc44eb54bd01fe4b7bd77995b37.tar.gz nixos-ff32ceaae000fbc44eb54bd01fe4b7bd77995b37.tar.bz2 nixos-ff32ceaae000fbc44eb54bd01fe4b7bd77995b37.tar.xz nixos-ff32ceaae000fbc44eb54bd01fe4b7bd77995b37.zip | |
openssh: certificate authority
Diffstat (limited to 'system-profiles/openssh/known-hosts/expiration.gup')
| -rw-r--r-- | system-profiles/openssh/known-hosts/expiration.gup | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/system-profiles/openssh/known-hosts/expiration.gup b/system-profiles/openssh/known-hosts/expiration.gup new file mode 100644 index 00000000..c8169262 --- /dev/null +++ b/system-profiles/openssh/known-hosts/expiration.gup | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #!/usr/bin/env zsh | ||
| 2 | set -eu | ||
| 3 | |||
| 4 | year=$(date +'%Y') | ||
| 5 | while [[ $((($(date -d "${year}0101" +'%s') - $(date +'%s')) / 86400)) -lt 150 ]]; do | ||
| 6 | year=$((year + 1)) | ||
| 7 | done | ||
| 8 | |||
| 9 | echo "${year}0101" > $1 | ||
| 10 | |||
| 11 | gup --always | ||
| 12 | gup --contents $1 \ No newline at end of file | ||
