diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2025-01-05 12:46:07 -0800 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2025-01-05 12:46:07 -0800 |
commit | 081978670a553835d503b53b7b91a9b2dbb77080 (patch) | |
tree | 613b1807bd89a1edb7d56084c039e811848f6c8b /create_service.sh | |
parent | 05343066f77cdc7c2e262bfd723ce82574a0d4e1 (diff) | |
download | oldinfra-081978670a553835d503b53b7b91a9b2dbb77080.tar.gz oldinfra-081978670a553835d503b53b7b91a9b2dbb77080.zip |
add whois
Diffstat (limited to 'create_service.sh')
-rwxr-xr-x | create_service.sh | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/create_service.sh b/create_service.sh index acbdf5f..ee01e7d 100755 --- a/create_service.sh +++ b/create_service.sh @@ -2,18 +2,25 @@ set -e -DNS_ENDPOINT="https://hatecomputers.club/dns" -BIND_FILE="roles/nameservers/templates/db.simponic.xyz.j2" - -SERVICE_TITLE="phoneof simponic." -SERVICE="phoneof" -SERVICE_PORT="6363" -SERVICE_REPO="git.simponic.xyz/simponic/$SERVICE" -SERVICE_ORIGIN="git@git.simponic.xyz:simponic/$SERVICE" -INTERNAL="no" -SERVICE_HOST="ryo" -PACKAGE_PATH="$HOME/git/simponic/$SERVICE" -HATECOMPUTERS_API_KEY="$(pbpaste)" +prompt_with_default() { + local prompt_message="$1" + local default_value="$2" + read -p "$prompt_message [$default_value]: " input + echo "${input:-$default_value}" +} + +DNS_ENDPOINT=$(prompt_with_default "Enter DNS endpoint" "https://hatecomputers.club/dns") +BIND_FILE=$(prompt_with_default "Enter bind file path" "roles/nameservers/templates/db.simponic.xyz.j2") + +SERVICE_TITLE=$(prompt_with_default "Enter service title" "phoneof simponic.") +SERVICE=$(prompt_with_default "Enter service name" "phoneof") +SERVICE_PORT=$(prompt_with_default "Enter service port" "6363") +SERVICE_REPO=$(prompt_with_default "Enter service repository URL" "git.simponic.xyz/simponic/$SERVICE") +SERVICE_ORIGIN=$(prompt_with_default "Enter service origin URL" "git@git.simponic.xyz:simponic/$SERVICE") +INTERNAL=$(prompt_with_default "Is the service internal? (yes/no)" "no") +SERVICE_HOST=$(prompt_with_default "Enter service host" "ryo") +PACKAGE_PATH=$(prompt_with_default "Enter package path" "$HOME/git/simponic/$SERVICE") +HATECOMPUTERS_API_KEY=$(prompt_with_default "Enter hatecomputers API key (paste from clipboard)" "$(pbpaste)") function render_template() { |