Compare commits

..

2 Commits

Author SHA1 Message Date
f03573d275 Update Cloud repository location 2022-11-18 15:16:41 +02:00
8719bfbe27 Small service names fix 2022-11-18 15:16:30 +02:00
2 changed files with 8 additions and 7 deletions

View File

@@ -136,8 +136,9 @@ for container_path in ${CONTAINER_PATHS[@]}; do
ok "$container_name" "is up to date!"
else
warn "$container_name" "is out of date!"
service=$(cat "$container_path/docker-compose.yml" | grep -B1 "$container_image" | head -1 | sed -e 's/^[ \t]*//' -e 's/://g')
info "Attempting to update" "$container_name"
debug "cat \"$container_path/docker-compose.yml\" | grep -B1 "image: $container_image" | head -1 | sed -e 's/^[ \t]*//' -e 's/://g'"
service=$(cat "$container_path/docker-compose.yml" | grep -B1 "image: $container_image" | head -1 | sed -e 's/^[ \t]*//' -e 's/://g')
info "Attempting to update service" "$service"
if docker-compose pull $service; then
info "Pulled latest image for" "$container_name"
if docker-compose up -d --remove-orphans; then

View File

@@ -30,7 +30,7 @@ help()
echo "Available repositories:"
echo "Gerbil-TK Photos (path: /var/Red-Vol/Media/Pictures)"
echo "Pukeko-XYZ-Containers Containers (path: /var/Red-Vol/Media/Containers)"
echo "Pukeko-XYZ-Cloud Data from all devices (path: /var/Red-Vol/Media/Cloud/Syncthing)"
echo "Pukeko-XYZ-Cloud Data from all devices (path: /var/Red-Vol/Media/Cloud)"
exit 0
}
#Pass arguments to the script
@@ -150,10 +150,10 @@ if [[ -n $REPOSITORY ]] && [[ -z $CLEAN ]]; then
backup Gerbil-TK /var/Red-Vol/Media/Pictures/
;;
(Pukeko-XYZ-Containers)
backup Pukeko-XYZ-Containers /var/Red-Vol/Media/Containers
backup Pukeko-XYZ-Containers /var/Red-Vol/Media/Containers/
;;
(Pukeko-XYZ-Cloud)
backup Pukeko-XYZ-Cloud /var/Red-Vol/Media/Cloud/Syncthing
backup Pukeko-XYZ-Cloud /var/Red-Vol/Media/Cloud/
;;
(*)
help;;
@@ -161,8 +161,8 @@ if [[ -n $REPOSITORY ]] && [[ -z $CLEAN ]]; then
#If cleaning was not forced, backup the repositories
elif [[ -z $CLEAN ]]; then
backup Gerbil-TK /var/Red-Vol/Media/Pictures/
backup Pukeko-XYZ-Containers /var/Red-Vol/Media/Containers
backup Pukeko-XYZ-Cloud /var/Red-Vol/Media/Cloud/Syncthing
backup Pukeko-XYZ-Containers /var/Red-Vol/Media/Containers/
backup Pukeko-XYZ-Cloud /var/Red-Vol/Media/Cloud/
#If a specific repository was requested to be cleaned, clean it
elif [[ -n $REPOSITORY ]] && [[ -n $CLEAN ]]; then
case "$REPOSITORY" in