Run script before sleep
#1
Is there any way to run a script before xbmc puts the computer to sleep?
I am developing a VPN extension and would like to make sure it disconnects before sleep.
Thanks.
Reply
#2
I don't think there's a way to know it's going to sleep specifically, but it'd be pretty simple to do it when xbmc exits. A simple service addon:
Code:
import xbmc
while not xbmc.abortRequested():
    xbmc.sleep(100)
disconnect_vpn()
Reply

Logout Mark Read Team Forum Stats Members Help
Run script before sleep0