mirror of
https://github.com/winapps-org/winapps.git
synced 2025-07-31 16:06:45 +02:00
Extract VM IPv4 address using regular expression.
This commit is contained in:
@@ -71,8 +71,7 @@ if [ -z "$RDP_IP" ]; then
|
||||
echo " virsh start RDPWindows"
|
||||
exit
|
||||
fi
|
||||
RDP_IP=$(virsh net-dhcp-leases default | grep RDPWindows | awk '{print $5}')
|
||||
RDP_IP=${RDP_IP%%\/*}
|
||||
RDP_IP=$(virsh net-dhcp-leases default | grep "RDPWindows" | grep -oE '([0-9]{1,3}\.){3}[0-9]{1,3}')
|
||||
fi
|
||||
|
||||
dprint "1:$1"
|
||||
|
Reference in New Issue
Block a user