def ConfigureStream(self, streamDescription): """Configure the Service according to the StreamDescription""" ret = AGService.ConfigureStream(self, streamDescription) if ret and self.started: # service is already running with this config; ignore return # if started, stop if self.started: self.Stop() # if enabled, start if self.enabled: self.Start()
def SetStream(self, streamDescription): """ Configure the Service according to the StreamDescription, and stop and start rat """ # Configure the stream ret = AGService.ConfigureStream(self, streamDescription) if ret and self.started: # service is already running with this config; ignore return # If started, stop if self.started: self.sysConf.AppFirewallConfig(self.rat_kill, 1) self.Stop() # If enabled, start if self.enabled: self.Start()