Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Linux Delay shutdown when SSH or Samba connections are opened
#31
(2013-03-28, 18:40)cube Wrote: The script only temporarily disables xbmc's own sleep. This means that you have to set sleep timer in the XBMC settings separately ... I'm not sure where in settings it is exactly.

System/Settings > System > Power saving > "Shutdown function timer" and "Shutdown function"
Reply
#32
Works perfect! Thank's for your work!
Reply
#33
Hi,
i have the problem, that it doesn't work anymore. i just installed my archlinux new, but the plugin fails during the startup:

Error
Scrippt failed! : inhibit_shutdown.py

do you have any idea? or is there an alternative plugin/script?
I use xbmc 12.2-5 (compiled: Jul 26 2013)

thanks!
Reply
#34
There should be a python backtrace from the add-on somewere in the logs. Without it I have just one idea -- is netstat installed and accessible as /bin/netstat ?
Reply
#35
I think this is the relevant part from the log file. I can even send you the whole log-file if needed.

Code:
18:19:38 T:139731511740352  NOTICE: Running the application...
18:19:38 T:139731041769216  NOTICE: -->Python Interpreter Initialized<--
18:19:38 T:139731041769216  NOTICE: service.inhibit_shutdown: Watching for remote connections to ports 445, 22 and for local connections to ports , sleep time is 60.00 s.
18:19:38 T:139731041769216   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.OSError'>
                                            Error Contents: [Errno 2] No such file or directory
                                            Traceback (most recent call last):
                                              File "/home/white/.xbmc/addons/service.inhibit_shutdown-master/inhibit_shutdown.py", line 67, in <module>
                                                if check_services():
                                              File "/home/white/.xbmc/addons/service.inhibit_shutdown-master/inhibit_shutdown.py", line 25, in check_services
                                                netstat = subprocess.check_output(['/bin/netstat', '-t', '-n'], universal_newlines=True)
                                              File "/usr/lib/python2.7/subprocess.py", line 568, in check_output
                                                process = Popen(stdout=PIPE, *popenargs, **kwargs)
                                              File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
                                                errread, errwrite)
                                              File "/usr/lib/python2.7/subprocess.py", line 1308, in _execute_child
                                                raise child_exception
                                            OSError: [Errno 2] No such file or directory
                                            -->End of Python script error report<--


EDIT:
I installed netstat-nat. But that is the wrong package. After installing the package net-tools, i don't get a error anymore.
thanks for your help! Smile
Reply
#36
Hi guys!
I needed this feature too.
Here is the my approach to solve this for SSH:
prevent suspend while ssh session is active
Works really robust and simple (no add-ons needed).
Welcome!Nod
Reply

Logout Mark Read Team Forum Stats Members Help
Delay shutdown when SSH or Samba connections are opened0
This forum uses Lukasz Tkacz MyBB addons.