From 5f9703c3966491c205dccdd98d4a4aa3704b1cda Mon Sep 17 00:00:00 2001 From: sang Date: Fri, 19 Jul 2024 18:59:26 +0800 Subject: [PATCH] chore: update logs --- lxc-iptag | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lxc-iptag b/lxc-iptag index 9daf3c7..7937f3a 100755 --- a/lxc-iptag +++ b/lxc-iptag @@ -45,6 +45,7 @@ main() { fi done + # Skip if no change if [[ "$(echo "${old_ips[@]}" | tr ' ' '\n' | sort -u)" == "$(echo "${new_ips[@]}" | tr ' ' '\n' | sort -u)" ]]; then echo "Skipping ${lxc_name} cause ip no changes" continue @@ -52,7 +53,7 @@ main() { # Set the tags joined_tags=$(IFS=';'; echo "${new_tags[*]}") - echo "Setting ${lxc_name} tags to ${joined_tags}" + echo "Setting ${lxc_name} tags from ${old_tags} to ${joined_tags}" pct set ${lxc_name} -tags "${joined_tags}" done sleep 60