mirror of
https://github.com/yldio/copilot.git
synced 2024-11-14 23:30:05 +02:00
feat: default domain in setup
This commit is contained in:
parent
3c3f6f1c65
commit
e1df4a14d3
11
gen-keys.sh
11
gen-keys.sh
@ -1,13 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e -o pipefail
|
set -e -o pipefail
|
||||||
|
|
||||||
echo -n "Enter the domain name you plan to use for this key: "
|
TRITON_ACCOUNT=$(triton account get | awk -F": " '/id:/{print $2}')
|
||||||
read domain
|
TRITON_DC=$(triton profile get | awk -F"/" '/url:/{print $3}' | awk -F'.' '{print $1}')
|
||||||
|
|
||||||
|
DEFAULT_DOMAIN=${TRITON_ACCOUNT}.${TRITON_DC}.cns.triton.zone
|
||||||
|
|
||||||
|
read -p "Enter the domain name you plan to use for this key [$DEFAULT_DOMAIN]: " domain
|
||||||
|
domain="${domain:-$DEFAULT_DOMAIN}"
|
||||||
echo -n "Enter the password to use for the key: "
|
echo -n "Enter the password to use for the key: "
|
||||||
read -s password
|
read -s password
|
||||||
echo
|
echo
|
||||||
echo "Generating key for $domain"
|
echo "Generating key for $domain"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
keys_path=keys-$domain
|
keys_path=keys-$domain
|
||||||
mkdir -p $keys_path
|
mkdir -p $keys_path
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user