Currently I'm running uShare to stream videos from my home-server via DLNA to the TV. On the server there is also running a bash-script which checks if a user is connected via ssh or Samba. If this is not the case, then the server goes to hibernation-mode.
Is there any possibility to check via bash-script if the server currently streams a video to my TV? If so, I would like to see a little code example which I could include in my script which check the ssh or Samba connection.