def keySave(self): for x in self["config"].list: x[1].save() if config.OpenWebif.enabled.value == True: HttpdRestart(global_session) else: HttpdStop(global_session) self.close()
def keySave(self): for x in self["config"].list: x[1].save() if not config.OpenWebif.auth.value is True: config.OpenWebif.auth_for_streaming.value = False config.OpenWebif.auth_for_streaming.save() if not config.OpenWebif.https_enabled.value is True: config.OpenWebif.https_clientcert.value = False config.OpenWebif.https_clientcert.save() if config.OpenWebif.enabled.value is True: HttpdRestart(global_session) else: HttpdStop(global_session) self.close()
def on_network_configuration_read(reason, **kwargs): """ Network interface callback function. Args: reason: Reason """ LOG.info("on_network_configuration_read({!r}, {!r})".format( reason, kwargs)) try: if reason is True: HttpdStart(global_session) else: HttpdStop(global_session) except Exception as exc: LOG.error(exc)
def IfUpIfDown(reason, **kwargs): if reason is True: HttpdStart(global_session) else: HttpdStop(global_session)