mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
Revert "Revert "Allow using --domain to specify a custom top-level domain""
This reverts commit d63f7fb248182e958a5e32003dfaddc5d3c3ab7f.
This commit is contained in:
parent
d63f7fb248
commit
d7981d2164
@ -54,6 +54,7 @@ function main(argv, config, callback) {
|
||||
.default("settings", DEFAULT_SETTINGS)
|
||||
.describe("settings", "Settings file to use")
|
||||
.describe("dump", "dump config file as JSON")
|
||||
.describe("domain", "Top-level domain to use (e.g, c9.io)")
|
||||
.boolean("help")
|
||||
.describe("help", "Show command line options.");
|
||||
|
||||
@ -86,6 +87,14 @@ function start(configName, options, callback) {
|
||||
|
||||
var settings = require(path.join(__dirname, "./settings", settingsName))();
|
||||
|
||||
if (argv.domain) {
|
||||
settings.c9.domain = argv.domain;
|
||||
for (var s in settings) {
|
||||
settings[s].baseUrl = settings[s].baseUrl
|
||||
&& settings[s].baseUrl.replace(/[^./]+\.[^.]+$/, argv.domain);
|
||||
}
|
||||
}
|
||||
|
||||
var plugins = require(configPath)(settings, options);
|
||||
|
||||
if (argv.help) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user