mirror of
https://github.com/thelounge/thelounge
synced 2024-11-22 12:03:11 +00:00
Minor fixes in the config
This commit is contained in:
parent
927fa92518
commit
e321c7eb99
2 changed files with 24 additions and 15 deletions
|
@ -62,16 +62,15 @@ module.exports = {
|
||||||
|
|
||||||
// ### `https`
|
// ### `https`
|
||||||
//
|
//
|
||||||
// These three settings are used to run The Lounge using encrypted HTTP/2 on
|
// These settings are used to run The Lounge's web server using encrypted TLS.
|
||||||
// the server side. This will fallback to regular HTTPS if HTTP/2 is not
|
|
||||||
// supported.
|
|
||||||
//
|
//
|
||||||
// If you want more control over the webserver,
|
// If you want more control over the webserver,
|
||||||
// [use a reverse proxy instead](https://thelounge.chat/docs/guides/reverse-proxies.html).
|
// [use a reverse proxy instead](https://thelounge.chat/docs/guides/reverse-proxies.html).
|
||||||
//
|
//
|
||||||
// The available keys for the `https` object are:
|
// The available keys for the `https` object are:
|
||||||
//
|
//
|
||||||
// - `enable`
|
// - `enable`: when set to `false`, HTTPS support is disabled
|
||||||
|
// and all other values are ignored.
|
||||||
// - `key`: Path to the private key file.
|
// - `key`: Path to the private key file.
|
||||||
// - `certificate`: Path to the certificate.
|
// - `certificate`: Path to the certificate.
|
||||||
// - `ca`: Path to the CA bundle.
|
// - `ca`: Path to the CA bundle.
|
||||||
|
@ -187,18 +186,19 @@ module.exports = {
|
||||||
//
|
//
|
||||||
// - `name`: Name to display in the channel list of The Lounge. This value is
|
// - `name`: Name to display in the channel list of The Lounge. This value is
|
||||||
// not forwarded to the IRC network.
|
// not forwarded to the IRC network.
|
||||||
// - `host`
|
// - `host`: IP address or hostname of the IRC server.
|
||||||
// - `port`: Usually 6667 for unencrypted connections and 6697 for
|
// - `port`: Usually 6667 for unencrypted connections and 6697 for
|
||||||
// connections encrypted with TLS.
|
// connections encrypted with TLS.
|
||||||
// - `password`
|
// - `password`: Connection password. If the server supports SASL capability,
|
||||||
|
// then this password will be used in SASL authentication.
|
||||||
// - `tls`: Enable TLS connections
|
// - `tls`: Enable TLS connections
|
||||||
// - `rejectUnauthorized`: Whether the server certificate should be verified
|
// - `rejectUnauthorized`: Whether the server certificate should be verified
|
||||||
// against the list of supplied Certificate Authorities (CAs) by your
|
// against the list of supplied Certificate Authorities (CAs) by your
|
||||||
// Node.js installation.
|
// Node.js installation.
|
||||||
// - `nick`: Percent signs (`%`) will be replaced by random numbers from 0 to
|
// - `nick`: Nick name. Percent signs (`%`) will be replaced by random
|
||||||
// 9. For example, `Guest%%%` may become `Guest123`.
|
// numbers from 0 to 9. For example, `Guest%%%` may become `Guest123`.
|
||||||
// - `username`
|
// - `username`: User name.
|
||||||
// - `realname`
|
// - `realname`: Real name.
|
||||||
// - `join`: Comma-separated list of channels to auto-join once connected.
|
// - `join`: Comma-separated list of channels to auto-join once connected.
|
||||||
//
|
//
|
||||||
// This value is set to connect to the official channel of The Lounge on
|
// This value is set to connect to the official channel of The Lounge on
|
||||||
|
@ -408,7 +408,7 @@ module.exports = {
|
||||||
// - `searchDN`: LDAP search DN settings. This defines the procedure by
|
// - `searchDN`: LDAP search DN settings. This defines the procedure by
|
||||||
// which The Lounge first looks for the user DN before authenticating them.
|
// which The Lounge first looks for the user DN before authenticating them.
|
||||||
// It is ignored if `baseDN` is specified. It is an object with the
|
// It is ignored if `baseDN` is specified. It is an object with the
|
||||||
// following keys:
|
// following keys:
|
||||||
searchDN: {
|
searchDN: {
|
||||||
// - `rootDN`: This bind DN is used to query the server for the DN of
|
// - `rootDN`: This bind DN is used to query the server for the DN of
|
||||||
// the user. This is supposed to be a system user that has access in
|
// the user. This is supposed to be a system user that has access in
|
||||||
|
|
|
@ -43,14 +43,19 @@ const extractedDoc = configContent
|
||||||
return acc;
|
return acc;
|
||||||
}, []).join("\n");
|
}, []).join("\n");
|
||||||
|
|
||||||
const infoBlock = `<!--
|
const infoBlockHeader = `<!--
|
||||||
DO NOT EDIT THIS FILE MANUALLY.
|
DO NOT EDIT THIS FILE MANUALLY.
|
||||||
Content for the following is generated by this script in the main repo:
|
Content for the following is generated by this script in the main repo:
|
||||||
https://github.com/thelounge/thelounge/blob/master/scripts/generate-config-doc.js
|
https://github.com/thelounge/thelounge/blob/master/scripts/generate-config-doc.js`;
|
||||||
Last updated at ${Date()} by ${getGitUsername()}
|
|
||||||
|
const infoBlockTop = `${infoBlockHeader}
|
||||||
|
Last updated at ${getPrettyDate()} (UTC) by ${getGitUsername()}
|
||||||
-->`;
|
-->`;
|
||||||
|
|
||||||
const generatedContent = `${infoBlock}\n\n${extractedDoc}\n${infoBlock}\n`;
|
const infoBlockBottom = `${infoBlockHeader}
|
||||||
|
-->`;
|
||||||
|
|
||||||
|
const generatedContent = `${infoBlockTop}\n\n${extractedDoc}\n${infoBlockBottom}\n`;
|
||||||
|
|
||||||
writeFileSync(docPath, generatedContent);
|
writeFileSync(docPath, generatedContent);
|
||||||
|
|
||||||
|
@ -59,3 +64,7 @@ log.info(
|
||||||
`(${colors.bold(generatedContent.length)} characters) ` +
|
`(${colors.bold(generatedContent.length)} characters) ` +
|
||||||
`were written in ${colors.green(docPath)}.`
|
`were written in ${colors.green(docPath)}.`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
function getPrettyDate() {
|
||||||
|
return (new Date()).toISOString().split(".")[0].replace("T", " ");
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue