merge feat/godoxy-agent and update README

This commit is contained in:
yusing
2025-03-28 03:13:59 +08:00
parent 5680a306ff
commit 350265e31f
7 changed files with 54 additions and 115 deletions

View File

@@ -21,23 +21,6 @@ fi
echo "Using ${DOWNLOAD_TOOL} for downloads"
# get_default_branch() {
# local repo="$1" # Format: owner/repo
# local branch
# if [ "$DOWNLOAD_TOOL" = "curl" ]; then
# branch=$(curl -sL "https://api.github.com/repos/${repo}" | grep -o '"default_branch": *"[^"]*"' | cut -d'"' -f4)
# elif [ "$DOWNLOAD_TOOL" = "wget" ]; then
# branch=$(wget -qO- "https://api.github.com/repos/${repo}" | grep -o '"default_branch": *"[^"]*"' | cut -d'"' -f4)
# fi
# if [ -z "$branch" ]; then
# echo "main" # Fallback to 'main' if detection fails
# else
# echo "$branch"
# fi
# }
# Environment variables with defaults
REPO="yusing/godoxy"
BRANCH=${BRANCH:-"main"}
@@ -218,11 +201,11 @@ if [ "$ENABLE_AUTOCERT" == "y" ]; then
ask_while_empty "Enter email for Let's Encrypt: " EMAIL
# ask if using cloudflare
ask_while_empty "Is your DNS provider cloudflare? (y/n): " USE_CLOUDFLARE
ask_while_empty "Is cloudflare the current DNS nameserver? (y/n): " USE_CLOUDFLARE
# ask for cloudflare api key
if [ "$USE_CLOUDFLARE" = "y" ]; then
ask_while_empty "Enter cloudflare api key: " CLOUDFLARE_API_KEY
ask_while_empty "Enter cloudflare zone api key: " CLOUDFLARE_API_KEY
cat <<EOF >>"$CONFIG_BASE_PATH/$CONFIG_FILE_NAME"
autocert:
provider: cloudflare