Skip to content

Commit

Permalink
Keep FBSD, BSD for ping only
Browse files Browse the repository at this point in the history
  • Loading branch information
louislam committed Jan 11, 2022
1 parent 0f822d3 commit ed64853
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions extra/healthcheck.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* 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";

Expand All @@ -21,7 +21,7 @@ if (sslKey && sslCert) {
let hostname = process.env.UPTIME_KUMA_HOST;

// 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;
}

Expand Down
6 changes: 3 additions & 3 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ console.log("Importing this project modules");
debug("Importing Monitor");
const Monitor = require("./model/monitor");
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");
const { Notification } = require("./notification");
Expand All @@ -65,8 +65,8 @@ console.info("Version: " + checkVersion.version);
// Dual-stack support for (::)
let hostname = process.env.UPTIME_KUMA_HOST || args.host;

// Also read HOST if not *BSD, as HOST is a system environment variable in FreeBSD
if (!hostname && !BSD) {
// Also read HOST if not FreeBSD, as HOST is a system environment variable in FreeBSD
if (!hostname && !FBSD) {
hostname = process.env.HOST;
}

Expand Down
1 change: 1 addition & 0 deletions server/util-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const nodeJsUtil = require("util");
exports.WIN = /^win/.test(process.platform);
exports.LIN = /^linux/.test(process.platform);
exports.MAC = /^darwin/.test(process.platform);
exports.FBSD = /^freebsd/.test(process.platform);
exports.BSD = /bsd$/.test(process.platform);

/**
Expand Down

0 comments on commit ed64853

Please sign in to comment.