Skip to content

Commit 458ebfe

Browse files
committed
feat: enhance backup notes with guest name and improve whitespace handling and content line matching in container parsing.
1 parent 058e860 commit 458ebfe

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tools/pve/update-apps.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function detect_service() {
131131

132132
function backup_container() {
133133
msg_info "Creating backup for container $1"
134-
vzdump $1 --compress zstd --storage $STORAGE_CHOICE -notes-template "community-scripts backup updater" >/dev/null 2>&1
134+
vzdump $1 --compress zstd --storage $STORAGE_CHOICE -notes-template "{{guestname}} - community-scripts backup updater" >/dev/null 2>&1
135135
status=$?
136136

137137
if [ $status -eq 0 ]; then
@@ -151,11 +151,11 @@ function get_backup_storages() {
151151
split($0, a, ":")
152152
type = a[1]
153153
name = a[2]
154-
sub(/^ +/, "", name)
154+
gsub(/^[ \t]+|[ \t]+$/, "", name)
155155
has_content = 0
156156
has_backup = 0
157157
}
158-
/^ +content/ {
158+
/^[ \t]*content/ {
159159
has_content = 1
160160
if ($0 ~ /backup/) has_backup = 1
161161
}

0 commit comments

Comments
 (0)