@ -43,7 +43,7 @@ console.log("Importing this project modules");
debug ( "Importing Monitor" ) ;
debug ( "Importing Monitor" ) ;
const Monitor = require ( "./model/monitor" ) ;
const Monitor = require ( "./model/monitor" ) ;
debug ( "Importing Settings" ) ;
debug ( "Importing Settings" ) ;
const { getSettings , setSettings , setting , initJWTSecret , checkLogin , startUnitTest } = require ( "./util-server" ) ;
const { getSettings , setSettings , setting , initJWTSecret , checkLogin , startUnitTest , FBSD } = require ( "./util-server" ) ;
debug ( "Importing Notification" ) ;
debug ( "Importing Notification" ) ;
const { Notification } = require ( "./notification" ) ;
const { Notification } = require ( "./notification" ) ;
@ -61,12 +61,22 @@ 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 (::)
const hostname = args . host || process . env . HOST ;
let hostname = process . env . UPTIME _KUMA _HOST || args . host ;
const port = parseInt ( args . port || process . env . PORT || 3001 ) ;
// Also read HOST if not FreeBSD, as HOST is a system environment variable in FreeBSD
if ( ! hostname && ! FBSD ) {
hostname = process . env . HOST ;
}
if ( hostname ) {
console . log ( "Custom hostname: " + hostname ) ;
}
const port = parseInt ( process . env . UPTIME _KUMA _PORT || process . env . PORT || args . port || 3001 ) ;
// SSL
// SSL
const sslKey = process . env . SSL _KEY || args [ "ssl-key" ] || undefined ;
const sslKey = process . env . UPTIME_KUMA _SSL _KEY || process . env . SSL_KEY || args [ "ssl-key" ] || undefined ;
const sslCert = process . env . SSL _CERT || args [ "ssl-cert" ] || undefined ;
const sslCert = process . env . UPTIME_KUMA _SSL _CERT || process . env . SSL_CERT || args [ "ssl-cert" ] || undefined ;
/ * *
/ * *
* Run unit test after the server is ready
* Run unit test after the server is ready