Difference between revisions of "Lxc disable autostart"

From UVOO Tech Wiki
Jump to navigation Jump to search
(Created page with "``` #!/bin/bash set -eu hosts=$(lxc list --format=json | jq -r '.[] | select(.state.status == "Stopped") | .name') for i in $hosts; do echo $i lxc config set $i boot.aut...")
 
(No difference)

Latest revision as of 21:23, 14 May 2023

#!/bin/bash
set -eu

hosts=$(lxc list --format=json | jq -r '.[] | select(.state.status == "Stopped") | .name')

for i in $hosts; do
  echo $i
  lxc config set $i boot.autostart false || true
done