simplify host fallback logic

move decision logic for freeBSD HOST environment var into temp var
pull/1141/head
Marc Harnos 3 years ago
parent d4b86dc472
commit 2c8d5d28e9
No known key found for this signature in database
GPG Key ID: A7D68CEB704F557A

@ -63,12 +63,9 @@ console.info("Version: " + checkVersion.version);
// If host is omitted, the server will accept connections on the unspecified IPv6 address (::) when IPv6 is available and the unspecified IPv4 address (0.0.0.0) otherwise. // If host is omitted, the server will accept connections on the unspecified IPv6 address (::) when IPv6 is available and the unspecified IPv4 address (0.0.0.0) otherwise.
// Dual-stack support for (::) // Dual-stack support for (::)
let hostname = process.env.UPTIME_KUMA_HOST || args.host;
// Also read HOST if not FreeBSD, as HOST is a system environment variable in FreeBSD // Also read HOST if not FreeBSD, as HOST is a system environment variable in FreeBSD
if (!hostname && !FBSD) { let hostEnv = FBSD ? null : process.env.HOST;
hostname = process.env.HOST; let hostname = process.env.UPTIME_KUMA_HOST || args.host || hostEnv;
}
if (hostname) { if (hostname) {
console.log("Custom hostname: " + hostname); console.log("Custom hostname: " + hostname);

Loading…
Cancel
Save