Compare commits

..

2 Commits

Author SHA1 Message Date
7b45d42daf improving docker updater
All checks were successful
Check scripts syntax / check-scripts-syntax (push) Successful in 35s
2025-05-24 00:48:39 -03:00
d54cbdced3 fixing scripts downloader 2025-05-24 00:45:16 -03:00
2 changed files with 13 additions and 13 deletions

View File

@ -58,6 +58,10 @@ fi
for folder in */; do
cd $DOCKER_FOLDER/$folder
# Remove trailing slash from folder name if it exists
folder=${folder%/}
echo -e "${LIGHT_BLUE}[$folder] Checking for updates..."
# if .ignore file exists, skip the folder
if [ -f ".ignore" ]; then
echo -e "${LIGHT_BLUE}[$folder] Skipping docker container update"
@ -65,17 +69,13 @@ for folder in */; do
continue
fi
# Check if docker-compose.yml or compose.yaml exists and remove the version attribute if it exists
if [ -f "docker-compose.yml" ]; then
echo -e "${LIGHT_BLUE}[$folder] Checking docker-compose.yml for obsolete version attribute"
sed -i '/^version:/d' docker-compose.yml
elif [ -f "compose.yaml" ]; then
echo -e "${LIGHT_BLUE}[$folder] Checking compose.yaml for obsolete version attribute"
sed -i '/^version:/d' compose.yaml
elif [ -f "compose.yml" ]; then
echo -e "${LIGHT_BLUE}[$folder] Checking compose.yml for obsolete version attribute"
sed -i '/^version:/d' compose.yml
fi
# Check compose files for obsolete version attribute
for compose_file in "docker-compose.yml" "docker-compose.yaml" "compose.yaml" "compose.yml"; do
if [ -f "$compose_file" ]; then
echo -e "${LIGHT_BLUE}[$folder] Checking $compose_file for obsolete version attribute"
sed -i '/^version:/d' "$compose_file"
fi
done
DOCKER_RUNNING=$(docker compose ps -q)
@ -95,7 +95,7 @@ for folder in */; do
echo -e "${LIGHT_GREEN}[$folder] Updated!"
cd ..
cd $DOCKER_FOLDER
done
# Run Docker image prune

View File

@ -109,7 +109,7 @@ FILES=("clean.sh" "backup.sh" "docker-updater.sh")
# Prompt user to select files to download
selected_files=()
echo -e "${GREY}[i] Select files to download and install on crontab:${NC}"
echo -e "${GREY}[i] Select files to download and install on crontab:${NC} "
for FILE in "${FILES[@]}"; do
read -p "Do you want to download and install $FILE? [Y/n]: " choice
if [[ "$choice" == "y" || "$choice" == "Y" || -z "$choice" ]]; then