chore: auto-commit 2026-03-30 06:58

This commit is contained in:
administrator 2026-03-30 06:58:19 +01:00
parent c5beca562b
commit 6b8186f496

View file

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
# ============================================================================== # ==============================================================================
# Wallarm Deployment Setup Script # Wallarm Deployment Setup Script (Forgejo Version)
# ============================================================================== # ==============================================================================
# Downloads all necessary Wallarm deployment scripts from GitLab repository # Downloads all necessary Wallarm deployment scripts from the Forgejo repository
# and makes them executable. # and makes them executable.
# ============================================================================== # ==============================================================================
@ -17,8 +17,9 @@ CYAN='\033[0;36m'
BOLD='\033[1m' BOLD='\033[1m'
NC='\033[0m' NC='\033[0m'
# Base URLs for GitLab raw content # Forgejo raw URL base
GITLAB_BASE="https://git.sechpoint.app/customer-engineering/wallarm/raw/branch/main/setup.sh" FORGEJO_BASE="https://git.sechpoint.app/customer-engineering/wallarm/raw/branch/main"
SCRIPTS=( SCRIPTS=(
"wallarm-ct-check.sh" "wallarm-ct-check.sh"
"wallarm-ct-deploy.sh" "wallarm-ct-deploy.sh"
@ -26,7 +27,7 @@ SCRIPTS=(
"wallarm-ct-uninstall.sh" "wallarm-ct-uninstall.sh"
) )
# Detect download command (curl preferred, fallback to wget) # Detect download command
if command -v curl >/dev/null 2>&1; then if command -v curl >/dev/null 2>&1; then
DOWNLOAD_CMD="curl -fL -O" DOWNLOAD_CMD="curl -fL -O"
DOWNLOAD_NAME="curl" DOWNLOAD_NAME="curl"
@ -39,10 +40,9 @@ else
exit 1 exit 1
fi fi
# Function to download a script
download_script() { download_script() {
local script="$1" local script="$1"
local url="${GITLAB_BASE}/${script}" local url="${FORGEJO_BASE}/${script}"
echo -e "${YELLOW}Downloading ${script}...${NC}" echo -e "${YELLOW}Downloading ${script}...${NC}"
if [ -f "$script" ]; then if [ -f "$script" ]; then
echo -e "${YELLOW} File already exists. Overwrite? (y/N)${NC}" echo -e "${YELLOW} File already exists. Overwrite? (y/N)${NC}"
@ -73,12 +73,12 @@ download_script() {
clear clear
echo -e "${BLUE}${BOLD}" echo -e "${BLUE}${BOLD}"
echo "╔══════════════════════════════════════════════════════════════╗" echo "╔══════════════════════════════════════════════════════════════╗"
echo "║ WALLARM DEPLOYMENT SETUP SCRIPT ║" echo "║ WALLARM DEPLOYMENT SETUP SCRIPT (Forgejo) ║"
echo "║ Downloads all necessary deployment tools ║" echo "║ Downloads all necessary deployment tools ║"
echo "╚══════════════════════════════════════════════════════════════╝${NC}" echo "╚══════════════════════════════════════════════════════════════╝${NC}"
echo echo
# Check for existing scripts and provide option to skip all # Check for existing scripts
if ls wallarm-ct-*.sh 2>/dev/null | grep -q .; then if ls wallarm-ct-*.sh 2>/dev/null | grep -q .; then
echo -e "${YELLOW}Existing Wallarm scripts found.${NC}" echo -e "${YELLOW}Existing Wallarm scripts found.${NC}"
echo -e "${YELLOW}Do you want to re-download all? (y/N)${NC}" echo -e "${YELLOW}Do you want to re-download all? (y/N)${NC}"