From b25b96d9dec5a46da8fa1ba2daf4b357f7e1b992 Mon Sep 17 00:00:00 2001 From: David Stephens Date: Sun, 26 Nov 2017 09:09:11 +0000 Subject: [PATCH] * Move default cert path into config * Update docs to reflect changes * More doc tweaks for new structure --- core/config.js | 18 +++++++++--------- docs/config.md | 2 +- docs/index.md | 2 +- docs/menu_system.md | 2 +- docs/modding.md | 2 +- docs/mods.md | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/core/config.js b/core/config.js index a33efb99..73f0fa28 100644 --- a/core/config.js +++ b/core/config.js @@ -124,8 +124,8 @@ function getDefaultConfig() { loginAttempts : 3, - menuFile : 'menu.hjson', // Override to use something else, e.g. demo.hjson. Can be a full path (defaults to ./mods) - promptFile : 'prompt.hjson', // Override to use soemthing else, e.g. myprompt.hjson. Can be a full path (defaults to ./mods) + menuFile : 'menu.hjson', // Override to use something else, e.g. demo.hjson. Can be a full path (defaults to ./config) + promptFile : 'prompt.hjson', // Override to use soemthing else, e.g. myprompt.hjson. Can be a full path (defaults to ./config) }, // :TODO: see notes below about 'theme' section - move this! @@ -215,18 +215,18 @@ function getDefaultConfig() { }, ssh : { port : 8889, - enabled : false, // defualt to false as PK/pass in config.hjson are required + enabled : false, // default to false as PK/pass in config.hjson are required // // Private key in PEM format // // Generating your PK: - // > openssl genrsa -des3 -out ./misc/ssh_private_key.pem 2048 + // > openssl genrsa -des3 -out ./config/ssh_private_key.pem 2048 // // Then, set servers.ssh.privateKeyPass to the password you use above // in your config.hjson // - privateKeyPem : paths.join(__dirname, './../misc/ssh_private_key.pem'), + privateKeyPem : paths.join(__dirname, './../config/ssh_private_key.pem'), firstMenu : 'sshConnected', firstMenuNewUser : 'sshConnectedNewUser', }, @@ -234,8 +234,8 @@ function getDefaultConfig() { port : 8810, // ws:// enabled : false, securePort : 8811, // wss:// - must provide certPem and keyPem - certPem : paths.join(__dirname, './../misc/https_cert.pem'), - keyPem : paths.join(__dirname, './../misc/https_cert_key.pem'), + certPem : paths.join(__dirname, './../config/https_cert.pem'), + keyPem : paths.join(__dirname, './../config/https_cert_key.pem'), }, }, @@ -271,8 +271,8 @@ function getDefaultConfig() { https : { enabled : false, port : 8443, - certPem : paths.join(__dirname, './../misc/https_cert.pem'), - keyPem : paths.join(__dirname, './../misc/https_cert_key.pem'), + certPem : paths.join(__dirname, './../config/https_cert.pem'), + keyPem : paths.join(__dirname, './../config/https_cert_key.pem'), } } }, diff --git a/docs/config.md b/docs/config.md index e2122f9f..98a6730f 100644 --- a/docs/config.md +++ b/docs/config.md @@ -2,7 +2,7 @@ Configuration files in ENiGMA½ are simple UTF-8 encoded [HJSON](http://hjson.org/) files. HJSON is just like JSON but simplified and much more resilient to human error. ## System Configuration -The main system configuration file, `config.hjson` both overrides defaults and provides additional configuration such as message areas. The default path is `/enigma-bbs-install-path/config.hjson` though you can override the `config.hjson` location with the `--config` parameter when invoking `main.js`. Values found in `core/config.js` may be overridden by simply providing the object members you wish replace. +The main system configuration file, `config.hjson` both overrides defaults and provides additional configuration such as message areas. The default path is `/enigma-bbs-install-path/config/config.hjson` though you can override the `config.hjson` location with the `--config` parameter when invoking `main.js`. Values found in `core/config.js` may be overridden by simply providing the object members you wish replace. ### Creating a Configuration Your initial configuration skeleton can be created using the `oputil.js` command line utility. From your enigma-bbs root directory: diff --git a/docs/index.md b/docs/index.md index 99f83e32..2320829c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -51,7 +51,7 @@ npm install ## Generate a SSH Private Key To utilize the SSH server, a SSH Private Key will need generated. This step can be skipped if you do not wish to enable SSH access. ```bash -openssl genrsa -des3 -out ./misc/ssh_private_key.pem 2048 +openssl genrsa -des3 -out ./config/ssh_private_key.pem 2048 ``` ### Create a Minimal Config diff --git a/docs/menu_system.md b/docs/menu_system.md index 026ef648..aef51199 100644 --- a/docs/menu_system.md +++ b/docs/menu_system.md @@ -3,7 +3,7 @@ ENiGMA½'s menu system is highly flexible and moddable. The possibilities are al This document and others will refer to `menu.hjson`. This should be seen as an alias to `yourboardname.hjson` (or whatever you reference in `config.hjson` using the `menuFile` property — see below). By modifying your `menu.hjson` you will be able to create a custom experience unique to your board. -The default `menu.hjson` file lives within the `mods` directory. It is **highly recommended** to specify another file by setting the `menuFile` property in your `config.hjson` file: +The default `menu.hjson` file lives within the `config` directory. It is **highly recommended** to specify another file by setting the `menuFile` property in your `config.hjson` file: ```hjson general: { /* Can also specify a full path */ diff --git a/docs/modding.md b/docs/modding.md index 9449a91e..609729b4 100644 --- a/docs/modding.md +++ b/docs/modding.md @@ -7,7 +7,7 @@ See [Configuration](config.md) See [Menu System](menu_system.md) ## Theming -Take a look at how the default `luciano_blocktronics` theme found under `mods/themes` works! +Take a look at how the default `luciano_blocktronics` theme found under `art/themes` works! TODO document me! diff --git a/docs/mods.md b/docs/mods.md index 3abc7e2f..f73a3fc6 100644 --- a/docs/mods.md +++ b/docs/mods.md @@ -1,5 +1,5 @@ # Mods - +Custom mods should be added to `/enigma-install-path/mods`. ## Existing Mods * **Married Bob Fetch Event**: An event for fetching the latest Married Bob ANSI's for display on you board. ACiDic release [ACD-MB4E.ZIP](https://l33t.codes/outgoing/ACD/ACD-MB4E.ZIP). Can also be [found on GitHub](https://github.com/NuSkooler/enigma-bbs-married_bob_evt)