I have a RaspberryPi, running the standard Pi distro, and a computer running Linux 16.04 in the same local network with fixed IP adresses. The Pi is used to wake the computer by sending a Wake-on-Lan package and then tunnelling onto the computer via SSH.
Is there an easy and simple way for the computer to send a message to the Pi, which the Pi then interprets as the computer having started up succesfully and being reachable?
I already have set up a system where the Pi is continuously pinging the computer until it gets a response, but I specificly want to have the computer message the Pi and not the Pi checking up on the computer.
echo foo | nc <pi ip address> <port>
into /etc/rc.local on computer, and have pi listen on the given port for messages in separate script or even background. You could then usewait
from script to know when background task finished. – Sergiy Kolodyazhnyy Nov 16 '18 at 18:42nc
tool for sending packets and testing connection with most *nix systems, and it's easy to make a simpke server-client type of thing with it – Sergiy Kolodyazhnyy Nov 16 '18 at 23:41