Changing urls
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Check scripts syntax / check-scripts-syntax (push) Successful in 2s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Check scripts syntax / check-scripts-syntax (push) Successful in 2s
				
			This commit is contained in:
		@@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
### AUTO-UPDATER ###
 | 
			
		||||
# Variables
 | 
			
		||||
SERVER_FILE="http://h.local/backup.sh"
 | 
			
		||||
SERVER_FILE="https://git.ivanch.me/ivanch/server-scripts/raw/branch/main/backup.sh"
 | 
			
		||||
SERVER_OK=1
 | 
			
		||||
 | 
			
		||||
# Check if the server file exists
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								clean.sh
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								clean.sh
									
									
									
									
									
								
							@@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
### AUTO-UPDATER ###
 | 
			
		||||
# Variables
 | 
			
		||||
SERVER_FILE="http://h.local/clean.sh"
 | 
			
		||||
SERVER_FILE="https://git.ivanch.me/ivanch/server-scripts/raw/branch/main/clean.sh"
 | 
			
		||||
SERVER_OK=1
 | 
			
		||||
 | 
			
		||||
# Check if the server file exists
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
# Usage:
 | 
			
		||||
## curl -sSL https://git.ivanch.me/ivanch/server-scripts/scripts-download.sh | bash
 | 
			
		||||
## curl -sSL https://git.ivanch.me/ivanch/server-scripts/raw/branch/main/scripts-download.sh | bash
 | 
			
		||||
 | 
			
		||||
# colors
 | 
			
		||||
RED='\033[1;31m'
 | 
			
		||||
@@ -13,6 +13,8 @@ LIGHT_GREEN='\033[1;32m'
 | 
			
		||||
GREY='\033[1;30m'
 | 
			
		||||
YELLOW='\033[1;33m'
 | 
			
		||||
 | 
			
		||||
FILES_URL="https://git.ivanch.me/ivanch/server-scripts/raw/branch/main"
 | 
			
		||||
 | 
			
		||||
echo -ne "\r${LIGHT_BLUE}[i] Running scripts-download.sh"
 | 
			
		||||
 | 
			
		||||
# Detect OS (Debian or Alpine)
 | 
			
		||||
@@ -104,12 +106,11 @@ echo -e "${GREEN}[✓] Crontab is running.${NC}"
 | 
			
		||||
 | 
			
		||||
# Variables
 | 
			
		||||
FILES=("clean.sh" "backup.sh")
 | 
			
		||||
SERVER_URL="http://h.local/"
 | 
			
		||||
 | 
			
		||||
# Check connection with the server for all files
 | 
			
		||||
echo -e "${GREY}[i] Checking connection with the server..."
 | 
			
		||||
for FILE in "${FILES[@]}"; do
 | 
			
		||||
    curl -s --head "$SERVER_URL/$FILE" | head -n 1 | grep "HTTP/1.[01] [23].." > /dev/null
 | 
			
		||||
    curl -s --head "$FILES_URL/$FILE" | head -n 1 | grep "HTTP/1.[01] [23].." > /dev/null
 | 
			
		||||
 | 
			
		||||
    if [ $? -ne 0 ]; then
 | 
			
		||||
        echo -e "${RED}[x] Error: $FILE not found on the server.${NC}" >&2
 | 
			
		||||
@@ -123,7 +124,7 @@ echo -e "${GREY}[i] Downloading scripts..."
 | 
			
		||||
 | 
			
		||||
# Download scripts
 | 
			
		||||
for FILE in "${FILES[@]}"; do
 | 
			
		||||
    curl -s -o "./$FILE" "$SERVER_URL/$FILE"
 | 
			
		||||
    curl -s -o "./$FILE" "$FILES_URL/$FILE"
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
echo -e "${GREEN}[✓] Scripts downloaded.${NC}"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user