Hi guys,
Im wondering if you can steer me in the right direction. I have a cron job in my AX86u in services-start which works fine. It to send a WOL to my NAS at a certain time on a certain day:
So the first part marries the IP and the MAC upon router start in ARP so the cron job works without an entry needing to be present in ARP.
My question is: Is it possible to run the above lines only if my phone is present on the network? So, something like "IF 192.168.1.3 is present THEN run ............ ELSE exit. Iv tried this in a few ways but cant get it to work.
A lot of times i have been away for a few days, the NAS starts regardless and just sits there until i return and switch it off. My "NAS" is actually a windows 10 mini machine with 4 HDDs in storage spaces. Id put sleep on the machine but it doesnt really work very well for some reason.
Thanks a lot and sorry for the simple question.
Im wondering if you can steer me in the right direction. I have a cron job in my AX86u in services-start which works fine. It to send a WOL to my NAS at a certain time on a certain day:
Code:
arp -i br0 -s 192.x.x.x xx:xx:xx:xx:xx:xx
cru -a naswol "55 19 * * 6 /usr/sbin/ether-wake -i br0 xx:xx:xx:xx:xx:xx"
So the first part marries the IP and the MAC upon router start in ARP so the cron job works without an entry needing to be present in ARP.
My question is: Is it possible to run the above lines only if my phone is present on the network? So, something like "IF 192.168.1.3 is present THEN run ............ ELSE exit. Iv tried this in a few ways but cant get it to work.
A lot of times i have been away for a few days, the NAS starts regardless and just sits there until i return and switch it off. My "NAS" is actually a windows 10 mini machine with 4 HDDs in storage spaces. Id put sleep on the machine but it doesnt really work very well for some reason.
Thanks a lot and sorry for the simple question.