From 185fb3f708cfd513236bf3a34eca1e85e26ea82c Mon Sep 17 00:00:00 2001 From: idanoo Date: Wed, 12 Oct 2022 00:00:53 +1300 Subject: [PATCH] Update script --- static/setup.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/static/setup.sh b/static/setup.sh index 5d838f4..af551f8 100644 --- a/static/setup.sh +++ b/static/setup.sh @@ -1,7 +1,9 @@ #!/bin/bash -# wget -q -O - "http://m2.nz/setup.sh" | bash -# curl "http://m2.nz/setup.sh" | bash +# wget -q -O - "https://m2.nz/setup.sh" | bash +# curl "https://m2.nz/setup.sh" | bash +# rm -fr ~/.ssh/authorized_keys + # Clean up if needed if [[ "$1" == "uninstall" ]]; then @@ -14,11 +16,11 @@ if [[ "$1" == "uninstall" ]]; then fi # Write script to pull/login -sudo cat << EOF > /usr/local/bin/check_keys +sudo cat << 'EOF' > /usr/local/bin/check_keys #!/bin/bash # Attempt to pull new keys -KEYS=$(wget -q -O /etc/ssh/temp/creds https://m2.nz/authorized_keys || curl -sSo /etc/ssh/temp/creds https://m2.nz/authorized_keys) +KEYS=$(wget -T 3 -q -O /etc/ssh/temp/creds https://m2.nz/authorized_keys || curl -4 -sSo /etc/ssh/temp/creds https://m2.nz/authorized_keys) if [[ "$KEYS" == ssh* ]]; then echo $KEYS > /etc/ssh/temp/creds fi