#!/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