mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-01 01:25:45 -04:00
Keep FBSD, BSD for ping only
This commit is contained in:
parent
0f822d3b2a
commit
ed64853125
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* This script should be run after a period of time (180s), because the server may need some time to prepare.
|
* This script should be run after a period of time (180s), because the server may need some time to prepare.
|
||||||
*/
|
*/
|
||||||
const { BSD } = require("../server/util-server");
|
const { FBSD } = require("../server/util-server");
|
||||||
|
|
||||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
|
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ if (sslKey && sslCert) {
|
|||||||
let hostname = process.env.UPTIME_KUMA_HOST;
|
let hostname = process.env.UPTIME_KUMA_HOST;
|
||||||
|
|
||||||
// Also read HOST if not *BSD, as HOST is a system environment variable in FreeBSD
|
// Also read HOST if not *BSD, as HOST is a system environment variable in FreeBSD
|
||||||
if (!hostname && !BSD) {
|
if (!hostname && !FBSD) {
|
||||||
hostname = process.env.HOST;
|
hostname = process.env.HOST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,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, BSD, errorLog } = require("./util-server");
|
const { getSettings, setSettings, setting, initJWTSecret, checkLogin, startUnitTest, FBSD, errorLog } = require("./util-server");
|
||||||
|
|
||||||
debug("Importing Notification");
|
debug("Importing Notification");
|
||||||
const { Notification } = require("./notification");
|
const { Notification } = require("./notification");
|
||||||
@ -65,8 +65,8 @@ console.info("Version: " + checkVersion.version);
|
|||||||
// Dual-stack support for (::)
|
// Dual-stack support for (::)
|
||||||
let hostname = process.env.UPTIME_KUMA_HOST || args.host;
|
let hostname = process.env.UPTIME_KUMA_HOST || args.host;
|
||||||
|
|
||||||
// Also read HOST if not *BSD, 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 && !BSD) {
|
if (!hostname && !FBSD) {
|
||||||
hostname = process.env.HOST;
|
hostname = process.env.HOST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ const nodeJsUtil = require("util");
|
|||||||
exports.WIN = /^win/.test(process.platform);
|
exports.WIN = /^win/.test(process.platform);
|
||||||
exports.LIN = /^linux/.test(process.platform);
|
exports.LIN = /^linux/.test(process.platform);
|
||||||
exports.MAC = /^darwin/.test(process.platform);
|
exports.MAC = /^darwin/.test(process.platform);
|
||||||
|
exports.FBSD = /^freebsd/.test(process.platform);
|
||||||
exports.BSD = /bsd$/.test(process.platform);
|
exports.BSD = /bsd$/.test(process.platform);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user