Created
December 26, 2022 15:27
-
-
Save kerus1024/69526b637e26b5c270a07cba56981b7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
get_lxc_list=`pvesh ls /nodes/localhost/lxc | awk '{ print $2 }'` | |
lxc_list=($get_lxc_list) | |
for container_id in "${lxc_list[@]}" | |
do | |
echo CT : $container_id | |
pct exec $container_id 'hostname' & | |
done | |
echo | |
wait | |
echo "ok" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment