2015-07-27, 18:33
Hello! I will try to explain what I want and why.
I have kodibuntu installed, I recently updated to Isengard, I love it. My htpc is doing nas work sometimes, like downloading and other stuff so I have been writing a custom script to autoshutdown the system when:
- Downloads are under 50 kb/s (transmission-remote) &
- No connections on some specifics ports (grepping netstat) &
- X have been idle for 15 minutes or more (grepping xprintidle)&
- Kodi it's not running (don't shutdown when I'm watching something)
Imagine I wake my pc from job and add a torrent, it download the file and now the system should shutdown. So I thought I could make a program that launch on boot instead of kodi, a simpel program 1 or 2 buttons to launch kodi easily with a remote, just to prevent kodi run and make my script work.
This is just an idea, may be there is an easy way.
As you can see I check idle time, I don't know how kodi works, If when I'm wathcing a movie there is no idle time then I shouldn't need to check if kodi is runnning and I won't need a custom program.
What do you think? Thanks.
I have kodibuntu installed, I recently updated to Isengard, I love it. My htpc is doing nas work sometimes, like downloading and other stuff so I have been writing a custom script to autoshutdown the system when:
- Downloads are under 50 kb/s (transmission-remote) &
- No connections on some specifics ports (grepping netstat) &
- X have been idle for 15 minutes or more (grepping xprintidle)&
- Kodi it's not running (don't shutdown when I'm watching something)
Imagine I wake my pc from job and add a torrent, it download the file and now the system should shutdown. So I thought I could make a program that launch on boot instead of kodi, a simpel program 1 or 2 buttons to launch kodi easily with a remote, just to prevent kodi run and make my script work.
This is just an idea, may be there is an easy way.
As you can see I check idle time, I don't know how kodi works, If when I'm wathcing a movie there is no idle time then I shouldn't need to check if kodi is runnning and I won't need a custom program.
What do you think? Thanks.