Explorar o código

Update update-lxcs.sh

add option to exclude an additional container by adding the CTID at the end of the shell command
tteckster %!s(int64=2) %!d(string=hai) anos
pai
achega
911d19cab6
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      misc/update-lxcs.sh

+ 2 - 2
misc/update-lxcs.sh

@@ -34,7 +34,8 @@ while true; do
   esac
 done
 clear
-containers=$(pct list | tail -n +2 | cut -f1 -d' ')
+exclude_container="$@"
+containers=$(pct list | tail -n +2 | cut -f1 -d' ' | grep -vE "^($exclude_container)$")
 function update_container() {
   container=$1
   header_info
@@ -49,7 +50,6 @@ function update_container() {
   esac
 }
 header_info
-
 for container in $containers; do
   status=$(pct status $container)
   template=$(pct config $container | grep -q "template:" && echo "true" || echo "false")