Article 52BHD socat TCP server

socat TCP server

by
dwilkinson80
from LinuxQuestions.org on (#52BHD)
Hi

I have a command running on a raspberry pi, it works great. If I use packet sender I can send TCP strings to the RPI and it runs the script as per the below. It currently runs when sending any string or even a blank string I think it just needs something to establish a connection on TCP 2023.

What I was hoping for was a simple addition to the below that would make it only run the script if a certain TCP string was received?

For example, send string of "playmusic" to TCP 2023 of the RPI and it runs the below command.

Code:socat -u tcp-l:2023,fork system:/home/pi/Music/test.shThanks in advance,
Daniellatest?d=yIl2AUoC8zA latest?i=qj9lGXmoheo:foPd31NDDz4:F7zBnMy latest?i=qj9lGXmoheo:foPd31NDDz4:V_sGLiP latest?d=qj6IDK7rITs latest?i=qj9lGXmoheo:foPd31NDDz4:gIN9vFwqj9lGXmoheo
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments