Ok I have 2 linux machines, machine A and machine B. Machine A is a server running icecast audio server. Machine B is a desktop in the studio running BUTT(Broadcast Using This Tool) an x11 app that sends audio back to machine A.
Butt on machine B sometimes crashes(in fact any app we've tried and on windows too eventually crashes), killing the stream. However I have found out I configure icecast to run a stript whenever the source disconnects. I have private key authorization working for ssh between A and B. I have a script that if I run on B (via normal interactive ssh) will reluanch butt. What I don't know is how to write the script on A so it will run the script I have on B.
I have tried this:
#!/bin/bash ssh username_placeholder@B '/home/username_placeholder/broadcast.sh' exit
running from A. But that seems to keep ssh alive. All I want to do is run it and hang up. broadcast.sh looks like this:
#!/bin/bash killall butt env DISPLAY=:0 butt& exit
This is because butt only runs in gui mode. and we do want to see the gui in the studio from time to time anyway. So how do I make it run that script and hangup, or is there an even better way to do this on A without trying to call the script on B. I want it to kill butt if it's still runing and then start it(remeber it still has to display on B, not A. and A is the computer that can know when the source on B hangs up.)
Computer A runs ubuntu server, and computer B runs linux mint in case anyone cares.