mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-22 14:30:58 -04:00
Merge branch 'master' into 2.0.X
# Conflicts: # package-lock.json
This commit is contained in:
commit
a13fc7079e
31 changed files with 403 additions and 81 deletions
|
@ -361,7 +361,11 @@ class UptimeKumaServer {
|
|||
* @returns {Promise<void>}
|
||||
*/
|
||||
async start() {
|
||||
this.startServices();
|
||||
let enable = await Settings.get("nscd");
|
||||
|
||||
if (enable || enable === null) {
|
||||
this.startNSCDServices();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -369,7 +373,11 @@ class UptimeKumaServer {
|
|||
* @returns {Promise<void>}
|
||||
*/
|
||||
async stop() {
|
||||
this.stopServices();
|
||||
let enable = await Settings.get("nscd");
|
||||
|
||||
if (enable || enable === null) {
|
||||
this.stopNSCDServices();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -377,7 +385,7 @@ class UptimeKumaServer {
|
|||
* For now, only used in Docker
|
||||
* @returns {void}
|
||||
*/
|
||||
startServices() {
|
||||
startNSCDServices() {
|
||||
if (process.env.UPTIME_KUMA_IS_CONTAINER) {
|
||||
try {
|
||||
log.info("services", "Starting nscd");
|
||||
|
@ -392,7 +400,7 @@ class UptimeKumaServer {
|
|||
* Stop all system services
|
||||
* @returns {void}
|
||||
*/
|
||||
stopServices() {
|
||||
stopNSCDServices() {
|
||||
if (process.env.UPTIME_KUMA_IS_CONTAINER) {
|
||||
try {
|
||||
log.info("services", "Stopping nscd");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue