1
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-11-25 06:06:19 +00:00
Lakka-LibreELEC/packages/addons/service/ttyd/source/default.py
2019-05-01 20:53:33 +02:00

21 lines
456 B
Python

# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
import subprocess
import xbmc
import xbmcaddon
class Monitor(xbmc.Monitor):
def __init__(self, *args, **kwargs):
xbmc.Monitor.__init__(self)
self.id = xbmcaddon.Addon().getAddonInfo('id')
def onSettingsChanged(self):
subprocess.call(['systemctl', 'restart', self.id])
if __name__ == "__main__":
Monitor().waitForAbort()