nexus_license
- : nexus_license
()¶ - : nexus_license
("activate")¶ - : nexus_license
("status")¶ - : nexus_license
("clear")¶ - :
info =nexus_license(mode, name, value, …)¶ Store, show or remove the licence of this Nexus install.
nexus_license ()(ornexus --licensefrom the shell) asks for the email address and licence key you registered with, checks them with the licence service of the download portal (POST /api/v1/license/status) and, when the service accepts them, stores them in license.json in the per-user settings folder: ~/.config/nexus on Linux (or underXDG_CONFIG_HOME), %APPDATA%\nexus on Windows. That is the filenexus_license_notifyandnexus_supportread, with the same content the Windows installer writes to %ProgramData%\Nexus\license.json. A key the service rejects, a licence that is not active, or a service that cannot be reached stores nothing. The key is only sent to that service:NEXUS_LICENSE_SERVER, else the"server"of an existing file, else https://nexusone.org.uk.nexus_license ("status")prints where the licence comes from and checks it now.nexus_license ("clear")removes the stored file.The startup file calls
nexus_license ("FirstRun"): while no licence is stored, an interactive session on an installed build asks for the email and key, at most once a day; Enter skips. Scripts, --eval, CI (CI,JENKINS_URL), runs without a terminal, development builds andNEXUS_NO_LICENSE_CHECKnever ask, nor does a settings folder whose license-check.json has"enabled": false.Options for scripts and tests:
"Email"and"Key"(skip the prompt),"Server","Timeout"(seconds),"FetchFcn"(replaces the HTTP call),"InputFcn"(replacesinput),"StateDir"(replaces the settings folder),"Interactive"(true: treat the session as interactive).The optional output is a struct with
state("stored","skipped","rejected","inactive","unreachable","nolicense","cleared", or for"status"the state of the check),message,emailandfile.