From 0f725726c0b6f3e4bc5dce32ce77328574cfa2c6 Mon Sep 17 00:00:00 2001 From: sneak Date: Wed, 22 May 2024 07:43:32 -0700 Subject: [PATCH] latest --- just-authorized-keys/README.md | 2 +- just-authorized-keys/prov.sh | 2 + prov.sh | 90 ---------------------------------- 3 files changed, 3 insertions(+), 91 deletions(-) delete mode 100644 prov.sh diff --git a/just-authorized-keys/README.md b/just-authorized-keys/README.md index 6e229c4..785837d 100644 --- a/just-authorized-keys/README.md +++ b/just-authorized-keys/README.md @@ -1,5 +1,5 @@ # usage ``` -curl -sL https://git.eeqj.de/sneak/prov/raw/branch/master/just-authorized-keys/prov.sh | sh +curl -sL https://git.eeqj.de/sneak/prov/raw/branch/master/just-authorized-keys/prov.sh | bash ``` diff --git a/just-authorized-keys/prov.sh b/just-authorized-keys/prov.sh index b334216..c95e708 100644 --- a/just-authorized-keys/prov.sh +++ b/just-authorized-keys/prov.sh @@ -14,6 +14,8 @@ function install_authorized_keys () { fi chmod 700 /root/.ssh chmod 600 /root/.ssh/authorized_keys + echo success + exit 0 } install_authorized_keys diff --git a/prov.sh b/prov.sh deleted file mode 100644 index 875255e..0000000 --- a/prov.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/bash - -export DEBIAN_FRONTEND=noninteractive - -function main() { - RELEASE="$(lsb_release -cs)" - apt update - prov-$RELEASE -} - -function install-jq { - if which jq >/dev/null 2>&1 ; then - return - fi - apt install -y jq -} - -function install-curl { - if which curl >/dev/null 2>&1 ; then - return - fi - apt install -y curl -} - -function detect-mirror-country() { - install-jq - install-curl - curl ipinfo.io | jq -r .country -} - -function set-mirror-country() { - MURM="main universe restricted multiverse" - COUNTRY="$(detect-mirror-country)" - URL="http://$COUNTRY.archive.ubuntu.com/ubuntu" - -cat > /etc/apt/sources.list.new </dev/null 2>&1 ; then - return - fi - - cd /tmp - git clone https://filippo.io/age && cd age - go build -o . filippo.io/age/cmd/... - mv ./age /usr/local/bin - cd - - rm -rf /tmp/age -} - -main