Run as a module as root.

Run as a module as root.

Creates a npyscreen.SplitForm to prompt the user in the command line for parameters to set up a Terminal .

Sets the following prefs:

  • BASEDIR - Base directory for all local autopilot data, typically /usr/autopilot
  • MSGPORT - Port to use for our ROUTER listener, default 5560
  • DATADIR - os.path.join(params[‘BASEDIR’], ‘data’)
  • SOUNDDIR - os.path.join(params[‘BASEDIR’], ‘sounds’)
  • PROTOCOLDIR - os.path.join(params[‘BASEDIR’], ‘protocols’)
  • LOGDIR - os.path.join(params[‘BASEDIR’], ‘logs’)
  • REPODIR - Path to autopilot git repo
  • PILOT_DB - Location of pilot_db.json used to populate pilots
class autopilot.setup.setup_terminal.TerminalSetupForm(draw_line_at=None, *args, **keywords)[source]

Bases: npyscreen.fmForm.SplitForm


Programmers should over-ride this in derived classes, creating widgets here

class autopilot.setup.setup_terminal.SetupApp[source]

Bases: npyscreen.apNPSApplicationManaged.NPSAppManaged


Override this method to perform any initialisation.


Unfold nested values from the SetupForm. Called recursively.

Parameters:v (dict) – unfolded values

Make a directory if it doesn’t exist and set its permissions to 0777

Parameters:adir (str) – Path to the directory