setup_terminal

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

create()[source]

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

afterEditing()[source]
class autopilot.setup.setup_terminal.SetupApp[source]

Bases: npyscreen.apNPSApplicationManaged.NPSAppManaged

onStart()[source]

Override this method to perform any initialisation.

autopilot.setup.setup_terminal.unfold_values(v)[source]

Unfold nested values from the SetupForm. Called recursively.

Parameters:v (dict) – unfolded values
autopilot.setup.setup_terminal.make_dir(adir)[source]

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

Parameters:adir (str) – Path to the directory