diff --git a/openplotterPypilot/openplotterPypilot.py b/openplotterPypilot/openplotterPypilot.py index 1f88367..0e1ca62 100644 --- a/openplotterPypilot/openplotterPypilot.py +++ b/openplotterPypilot/openplotterPypilot.py @@ -130,22 +130,22 @@ def enable_tools(v): self.toolbar1.EnableTool(107,True) self.ShowStatusBarYELLOW(result[1]+_(' Press "Approve" and then "Refresh".')) if self.active('pypilot') or self.active('pypilot_boatimu'): - self.service('disable') + #self.service('disable') enable_tools(0) elif result[0] == 'error': self.ShowStatusBarRED(result[1]) if self.active('pypilot') or self.active('pypilot_boatimu'): - self.service('disable') + #self.service('disable') enable_tools(0) elif result[0] == 'repeat': self.ShowStatusBarYELLOW(result[1]+_(' Press "Refresh".')) if self.active('pypilot') or self.active('pypilot_boatimu'): - self.service('disable') + #self.service('disable') enable_tools(0) elif result[0] == 'permissions': self.ShowStatusBarYELLOW(result[1]+_(' Press "Allowed".')) if self.active('pypilot') or self.active('pypilot_boatimu'): - self.service('disable') + #self.service('disable') enable_tools(0) elif result[0] == 'approved' or result[0] == 'validated': if result[1]: self.ShowStatusBarGREEN(result[1]) diff --git a/openplotterPypilot/pypilotPreUninstall.py b/openplotterPypilot/pypilotPreUninstall.py index 00dcedc..7131e04 100644 --- a/openplotterPypilot/pypilotPreUninstall.py +++ b/openplotterPypilot/pypilotPreUninstall.py @@ -32,20 +32,16 @@ def main(): os.system('rm -rf '+conf2.home+'/.pypilot') subprocess.call(['systemctl', 'disable', 'pypilot']) subprocess.call(['systemctl', 'disable', 'pypilot_boatimu']) - subprocess.call(['systemctl', 'disable', 'openplotter-pypilot-read']) subprocess.call(['systemctl', 'disable', 'pypilot_web']) subprocess.call(['systemctl', 'disable', 'pypilot_hat']) subprocess.call(['systemctl', 'stop', 'pypilot']) subprocess.call(['systemctl', 'stop', 'pypilot_boatimu']) - subprocess.call(['systemctl', 'stop', 'openplotter-pypilot-read']) subprocess.call(['systemctl', 'stop', 'pypilot_web']) subprocess.call(['systemctl', 'stop', 'pypilot_hat']) os.system('rm -f /etc/systemd/system/pypilot.service') os.system('rm -f /etc/systemd/system/pypilot_boatimu.service') - os.system('rm -f /etc/systemd/system/openplotter-pypilot-read.service') os.system('rm -f /etc/systemd/system/pypilot_hat.service') os.system('rm -f /etc/systemd/system/pypilot_web.service') - subprocess.call(['systemctl', 'daemon-reload']) print(_('DONE')) except Exception as e: print(_('FAILED: ')+str(e)) diff --git a/openplotterPypilot/startup.py b/openplotterPypilot/startup.py index 82ae0d9..a32ea04 100644 --- a/openplotterPypilot/startup.py +++ b/openplotterPypilot/startup.py @@ -87,9 +87,6 @@ def addblack(n): file.write(token) file.close() addblack(_('Access to Signal K server validated')) - if active('pypilot'): subprocess.call([self.platform.admin, 'systemctl', 'restart', 'pypilot']) - if active('pypilot_boatimu'): subprocess.call([self.platform.admin, 'systemctl', 'restart', 'pypilot_boatimu']) - if active('openplotter-pypilot-read'): subprocess.call([self.platform.admin, 'systemctl', 'restart', 'openplotter-pypilot-read']) #services status running = ' ' + _('running')