mirror of
https://github.com/linuxserver/libreelec-addon-repo.git
synced 2026-02-20 01:00:59 +08:00
* Pi-hole initial commit * password required * Add files via upload * Update addon.xml * open addon settings if password is not set * create zip * enable/disable ipv6 * Update settings-default.xml * Update settings.xml * Update strings.po * update zip * Update settings.xml * Update docker.linuxserver.pi-hole * Update settings.xml * Update settings-default.xml * update zip * Update strings.po * update zip
22 lines
467 B
Python
22 lines
467 B
Python
|
|
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])
|
|
|
|
E_password = xbmcaddon.Addon().getSetting('E_pass')
|
|
if E_password == "":
|
|
xbmcaddon.Addon().openSettings('id')
|
|
|
|
if __name__ == '__main__':
|
|
Monitor().waitForAbort()
|