October 30, 20205 yr Hello guys , I am a chinese user , and have a problem while using unraid , could someone help me to think a little : In unraid , running a openwrt VM as the main router , connecting a wifi router as the AP . Sometimes the openwrt fail to assign the local IP to the wifi client (maybe cause by the bypass router maybe not), so all client under the wifi can't do nothing. Sometimes I can login in unraid to stop and start the VM by setting a lot thing, sometimes I can't , so just reboot. I think , maybe I could use a script to detect if unraid couldn't ping the internet or openwrt(10.0.0.99) , then forcestop and start the vm . I didn't know about the script , could someone help or have any idea ? Thank you .
October 30, 20205 yr Author how about this one , haven't try it yet . #!/bin/bash ping -c10 10.0.0.99 > /dev/null if [ $? -eq 0 ] then exit 0 else virsh stop openwrt sleep 10s virsh start openwrt fi Edited October 30, 20205 yr by trinculo
Archived
This topic is now archived and is closed to further replies.