podman migration done, auto-update fixes
This commit is contained in:
1 parent
bf8c226bbe
commit
03df70a244
2 files changed
+24
-4
No files matched your search
+22
-3
@@ -197,15 +197,34 @@ do_start_stop_containers() {
|
|||||||
return $rc
|
return $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# podman auto-update nach dem Backup starten
|
||||||
|
#
|
||||||
|
# Die fn schreibt sehr viel ins Log, damit der Update ggf. nachvollzogen werden kann,
|
||||||
|
# wenn etwas daneben geht.
|
||||||
|
#
|
||||||
update_services() {
|
update_services() {
|
||||||
log $DEBUG "$DBG update_services()"
|
log $DEBUG "$DBG update_services()"
|
||||||
mail_log $INFO "$INF update services"
|
mail_log $INFO "$INF update services"
|
||||||
local upd=$($CONTAINER_SVC_UPDATE_USER 2>&1 | tee -a $LOG_FILE | egrep 'registry\s+true' | sed 's/^.* \([^[:space:]]*\/[^[:space:]]*\).*$/\1/g')
|
local old_img=$($PODMAN ps --format "table {{.ImageID}} {{.Names}} {{.Image}}" --sort names)
|
||||||
|
echo "$old_img" >>$LOG_FILE 2>&1
|
||||||
|
local plan=$($CONTAINER_SVC_UPDATE_USER --dry-run --format "{{.Image}} {{.Updated}}" 2>&1 | grep pending | sed 's/^\(.*\) pending/\1/')
|
||||||
|
local upd=$($CONTAINER_SVC_UPDATE_USER --format "table {{.Image}} {{.Updated}}" 2>&1 | tee -a $LOG_FILE | grep true | sed 's/^\(.*\) true/\1/')
|
||||||
check_pipe_rc ${PIPESTATUS[@]}
|
check_pipe_rc ${PIPESTATUS[@]}
|
||||||
local rc=$?
|
local rc=$?
|
||||||
for i in $upd; do
|
# warten bis alle wieder da sind (wg. ps)
|
||||||
mail_log $INFO "$INF $i"
|
sleep 20
|
||||||
|
local new_img=$($PODMAN ps --format "table {{.ImageID}} {{.Names}} {{.Image}}" --sort names)
|
||||||
|
echo "$new_img" >>$LOG_FILE 2>&1
|
||||||
|
for i in $plan; do
|
||||||
|
mail_log $INFO "$INF pending: $i"
|
||||||
done
|
done
|
||||||
|
for i in $upd; do
|
||||||
|
mail_log $INFO "$INF updated: $i"
|
||||||
|
done
|
||||||
|
# diff output bring zu wenig
|
||||||
|
#log $DEBUG "$DBG diff before after"
|
||||||
|
#local diff_img=$(diff <(echo "$old_img") <(echo "$new_img"))
|
||||||
|
#echo "$diff_img" >> $LOG_FILE
|
||||||
return $rc
|
return $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
# entrypoint for all actions
|
# entrypoint for all actions
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# 2.2.0 16.05.2025 - fixes for auto-update, podman migration done
|
||||||
# 2.1.17 11.05.2025 - bugfixes, sort tar archive, split daily/cron daily
|
# 2.1.17 11.05.2025 - bugfixes, sort tar archive, split daily/cron daily
|
||||||
# 2.1.16 10.05.2025 - fix mail.sh, log results of auto-update
|
# 2.1.16 10.05.2025 - fix mail.sh, log results of auto-update
|
||||||
# 2.1.15 09.05.2025 - podman auto-update
|
# 2.1.15 09.05.2025 - podman auto-update
|
||||||
@@ -16,7 +17,7 @@
|
|||||||
# 2.1.7 29.04.2025 - 1. Schritt zur Umstellung auf podman
|
# 2.1.7 29.04.2025 - 1. Schritt zur Umstellung auf podman
|
||||||
# 2.1.6 29.04.2025 - weekly backup Sa->SO
|
# 2.1.6 29.04.2025 - weekly backup Sa->SO
|
||||||
|
|
||||||
VER="2.1.17"
|
VER="2.2.0"
|
||||||
|
|
||||||
HERE=$(dirname "$0")
|
HERE=$(dirname "$0")
|
||||||
THIS_SCRIPT=$0
|
THIS_SCRIPT=$0
|
||||||
|
|||||||
Reference in new issue
Block a user