Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions bin/winapps
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,23 @@ if [ -z "$(which xfreerdp)" ]; then
exit
fi

if [ -z "${RDP_NAME}" ]; then
RDP_NAME="RDPWindows"
fi

if [ -z "${RDP_IP}" ]; then
if [ -z "$(groups |grep libvirt)" ]; then
echo "You are not a member of the libvirt group. Run the below then reboot."
echo ' sudo usermod -a -G libvirt $(whoami)'
echo ' sudo usermod -a -G kvm $(whoami)'
exit
fi
if [ -z "$(virsh list |grep RDPWindows)" ]; then
if [ -z "$(virsh list |grep ${RDP_NAME})" ]; then
echo "RDPWindows is not running, run:"
echo " virsh start RDPWindows"
echo " virsh start ${RDP_NAME}"
exit
fi
RDP_IP=$(virsh net-dhcp-leases default |grep RDPWindows |awk '{print $5}')
RDP_IP=$(virsh net-dhcp-leases default |grep "${RDP_NAME}" |awk '{print $5}')
RDP_IP=${RDP_IP%%\/*}
fi

Expand Down