bash script to list which virtual servers are using a specific pool.
Problem this snippet solves: bash script to list which virtual servers are using a specific pool How to use this snippet: Usage:script_name pool_name pool_name ...
Remember to use the correct ca...
Published May 05, 2015
Version 1.0suttonsc
Employee
Joined May 16, 2019
suttonsc
Employee
Joined May 16, 2019
arpydays
Oct 23, 2017Nimbostratus
@Wallace, assuming your are iterating through a list of VS names and you want to check if they exist first, the following may work. It attempts to list the VS name passed in, if it exists do something, if the command errors ie. the VS doesn't exist do nothing.
tmsh_out=""
tmsh_out=$(tmsh -q list ltm virtual $vs 2>/dev/null)
[[ "$tmsh_out" ]] && echo 1