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