Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions openplotterPypilot/openplotterPypilot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
4 changes: 0 additions & 4 deletions openplotterPypilot/pypilotPreUninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
3 changes: 0 additions & 3 deletions openplotterPypilot/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down