From 6f393077d1742daa5e301a79e59a1e033ef9d6e1 Mon Sep 17 00:00:00 2001 From: finn Date: Sun, 20 Sep 2026 20:31:50 -0700 Subject: [PATCH] general crud baseline for secondary user --- .gitignore | 2 +- create-linode.sh | 143 ++++++++++++++++++++++++++++++++++++++++++++++ voldirections.txt | 25 ++++++++ 3 files changed, 169 insertions(+), 1 deletion(-) create mode 100755 create-linode.sh create mode 100644 voldirections.txt diff --git a/.gitignore b/.gitignore index 30bd623..8fc419f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ .env - +linodes.log diff --git a/create-linode.sh b/create-linode.sh new file mode 100755 index 0000000..a6ad0f9 --- /dev/null +++ b/create-linode.sh @@ -0,0 +1,143 @@ +#!/bin/bash + +# For my use, debian for the little one, ubuntu for the big ones + +# From .env, following values: +# LINODE_API_KEY (used for all Linode API calls below, via curl) +# WHICH_DOMAIN +# ROOT_PASS +source .env +# All Linode API requests use the API key sourced from .env above: +# curl -H "Authorization: Bearer $LINODE_API_KEY" https://api.linode.com/v4/... +#ROOT_PASS=$(for w in {1..3}; do echo -n $(cat /usr/share/dict/words | grep -v "'" | sed -n $(echo "$(cat /usr/share/dict/words | grep -v "'" | wc -l) * $RANDOM / 32768 + 1" | bc)p); done) +#ROOT_PASS="StartRootPass5678" +SCRIPT_ACTION=$1 +LINODE_LABEL=$2 +# ni7ne 1997630 +# oily 2111036 +WHICH_DOMAIN="2111036" +LOGFILE="./linodes.log" + +if [[ "$SCRIPT_ACTION" == "" || "$SCRIPT_ACTION" == "--help" || "$SCRIPT_ACTION" == "-?" ]]; then + echo "Linode helper script: create-linode.sh