Compare commits
2 Commits
ed6614c4b1
...
f03573d275
| Author | SHA1 | Date | |
|---|---|---|---|
| f03573d275 | |||
| 8719bfbe27 |
@@ -136,8 +136,9 @@ for container_path in ${CONTAINER_PATHS[@]}; do
|
|||||||
ok "$container_name" "is up to date!"
|
ok "$container_name" "is up to date!"
|
||||||
else
|
else
|
||||||
warn "$container_name" "is out of date!"
|
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')
|
debug "cat \"$container_path/docker-compose.yml\" | grep -B1 "image: $container_image" | head -1 | sed -e 's/^[ \t]*//' -e 's/://g'"
|
||||||
info "Attempting to update" "$container_name"
|
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
|
if docker-compose pull $service; then
|
||||||
info "Pulled latest image for" "$container_name"
|
info "Pulled latest image for" "$container_name"
|
||||||
if docker-compose up -d --remove-orphans; then
|
if docker-compose up -d --remove-orphans; then
|
||||||
|
|||||||
10
Kumonoboru
10
Kumonoboru
@@ -30,7 +30,7 @@ help()
|
|||||||
echo "Available repositories:"
|
echo "Available repositories:"
|
||||||
echo "Gerbil-TK Photos (path: /var/Red-Vol/Media/Pictures)"
|
echo "Gerbil-TK Photos (path: /var/Red-Vol/Media/Pictures)"
|
||||||
echo "Pukeko-XYZ-Containers Containers (path: /var/Red-Vol/Media/Containers)"
|
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
|
exit 0
|
||||||
}
|
}
|
||||||
#Pass arguments to the script
|
#Pass arguments to the script
|
||||||
@@ -150,10 +150,10 @@ if [[ -n $REPOSITORY ]] && [[ -z $CLEAN ]]; then
|
|||||||
backup Gerbil-TK /var/Red-Vol/Media/Pictures/
|
backup Gerbil-TK /var/Red-Vol/Media/Pictures/
|
||||||
;;
|
;;
|
||||||
(Pukeko-XYZ-Containers)
|
(Pukeko-XYZ-Containers)
|
||||||
backup Pukeko-XYZ-Containers /var/Red-Vol/Media/Containers
|
backup Pukeko-XYZ-Containers /var/Red-Vol/Media/Containers/
|
||||||
;;
|
;;
|
||||||
(Pukeko-XYZ-Cloud)
|
(Pukeko-XYZ-Cloud)
|
||||||
backup Pukeko-XYZ-Cloud /var/Red-Vol/Media/Cloud/Syncthing
|
backup Pukeko-XYZ-Cloud /var/Red-Vol/Media/Cloud/
|
||||||
;;
|
;;
|
||||||
(*)
|
(*)
|
||||||
help;;
|
help;;
|
||||||
@@ -161,8 +161,8 @@ if [[ -n $REPOSITORY ]] && [[ -z $CLEAN ]]; then
|
|||||||
#If cleaning was not forced, backup the repositories
|
#If cleaning was not forced, backup the repositories
|
||||||
elif [[ -z $CLEAN ]]; then
|
elif [[ -z $CLEAN ]]; then
|
||||||
backup Gerbil-TK /var/Red-Vol/Media/Pictures/
|
backup Gerbil-TK /var/Red-Vol/Media/Pictures/
|
||||||
backup Pukeko-XYZ-Containers /var/Red-Vol/Media/Containers
|
backup Pukeko-XYZ-Containers /var/Red-Vol/Media/Containers/
|
||||||
backup Pukeko-XYZ-Cloud /var/Red-Vol/Media/Cloud/Syncthing
|
backup Pukeko-XYZ-Cloud /var/Red-Vol/Media/Cloud/
|
||||||
#If a specific repository was requested to be cleaned, clean it
|
#If a specific repository was requested to be cleaned, clean it
|
||||||
elif [[ -n $REPOSITORY ]] && [[ -n $CLEAN ]]; then
|
elif [[ -n $REPOSITORY ]] && [[ -n $CLEAN ]]; then
|
||||||
case "$REPOSITORY" in
|
case "$REPOSITORY" in
|
||||||
|
|||||||
Reference in New Issue
Block a user