summaryrefslogtreecommitdiff
path: root/system-profiles/openssh/known-hosts/expiration.gup
diff options
context:
space:
mode:
Diffstat (limited to 'system-profiles/openssh/known-hosts/expiration.gup')
-rw-r--r--system-profiles/openssh/known-hosts/expiration.gup12
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
2set -eu
3
4year=$(date +'%Y')
5while [[ $((($(date -d "${year}0101" +'%s') - $(date +'%s')) / 86400)) -lt 150 ]]; do
6 year=$((year + 1))
7done
8
9echo "${year}0101" > $1
10
11gup --always
12gup --contents $1 \ No newline at end of file