summaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
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 -