Prevent suspend from another xbmc machine - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52) +---- Thread: Prevent suspend from another xbmc machine (/showthread.php?tid=144091) |
Prevent suspend from another xbmc machine - bilbonvidia - 2012-10-31 I have my main htpc set to suspend after 30 mins of inactivity. Is there a way to stop it suspending when another xbmc machine is on? Is there someway to reset the idle timer remotely? RE: Prevent suspend from another xbmc machine - bibi - 2012-11-02 I use a xcript to check if there is any net activity on my server [code] !/bin/bash #test connexion SSH HTTPS et NFS connexionSSH=$((netstat -n | grep ESTA) | grep -c 10000) connexionhttps=$((netstat | grep ESTA)| grep -c https) connexionSMB=$((netstat | grep ESTA) | grep -c microsoft) connexionTVHeadend=$((netstat -n | grep ESTA) | grep -c 9982) connexionNFS=$((netstat | grep ESTA) | grep -c nfs) connexionUsenet=$((netstat | grep ESTA) | grep -c newszilla) echo shh echo $connexionSSH echo subsonic echo $connexionhttps echo nfs echo $connexionNFS echo tv echo $connexionTVHeadend echo smb echo $connexionSMB echo usenet echo $connexionUsenet if [ $connexionSSH -eq 0 ] && [ $connexionNFS -eq 0 ] && [ $connexionhttps -eq 0 ] && [ $connexionTVHeadend -eq 0 ] && [ $connexionSMB -eq 0 ] && [ $connexionUsenet -eq 0 ] then pm-suspend fi exit 0 {/code] RE: Prevent suspend from another xbmc machine - bilbonvidia - 2012-11-02 Thank you, I have managed to cobble this together Code: #!/bin/bash Which seems to work only problem is that it does not take account of an active recording. The 9982 3 times is to take account of the fact xbmc runs on the same machine and is always connected on that port. I may be able to take account of recordings if I remove the directory off the local machine put it on a windows share and count for more 192.168.0.:microsoft-ds ESTABLISHED. RE: Prevent suspend from another xbmc machine - bilbonvidia - 2012-11-03 Code: #!/bin/bash This does it. |