summaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorElizabeth Alexander Hunt <me@liz.coffee>2026-07-11 13:23:42 -0700
committerElizabeth Alexander Hunt <me@liz.coffee>2026-07-11 13:23:42 -0700
commitcd742f862f75bbf8cd1eacc42ec6374a97846277 (patch)
treefef709b5ff5fb79c88d130d55f90506557c8e7a7 /install.sh
parent65f13215165cdc7768046235983cdb812bb00a33 (diff)
downloadkeys-cd742f862f75bbf8cd1eacc42ec6374a97846277.tar.gz
keys-cd742f862f75bbf8cd1eacc42ec6374a97846277.zip
Update
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/install.sh b/install.sh
index ca4f86f..0141b83 100755
--- a/install.sh
+++ b/install.sh
@@ -1,13 +1,12 @@
#!/bin/bash
-set -eo pipefail
-
sudo cp sshd_config /etc/sshd_config
HOME=$(getent passwd "$USER" | cut -d: -f6)
mkdir -p "$HOME/.local/bin/"
cp refresh_keys.sh "$HOME/.local/bin"
-JOB="17 * * * * $HOME/.local/bin/refresh_keys.sh"
-( crontab -l 2>/dev/null | grep -vF 'replace.sh'; echo "$JOB" ) | crontab -
+MIN=$(( 0x$(hostname | md5sum | cut -c1-15) % 30 ))
+JOB="*/$MIN * * * * $HOME/.local/bin/refresh_keys.sh"
+( crontab -l 2>/dev/null | grep -vF 'refresh_keys.sh'; echo "$JOB" ) | crontab -