diff options
author | destruc7i0n <destruc7i0n@users.noreply.github.com> | 2021-12-29 16:06:52 -0500 |
---|---|---|
committer | destruc7i0n <destruc7i0n@users.noreply.github.com> | 2021-12-29 16:06:52 -0500 |
commit | 417dfa990f1b085251bee137a745b4752f3b5dab (patch) | |
tree | d71d20f51135a380bfbcda1a33889038bec87375 /src | |
parent | 3.1.0 (diff) | |
download | shulker-417dfa990f1b085251bee137a745b4752f3b5dab.tar.gz shulker-417dfa990f1b085251bee137a745b4752f3b5dab.zip |
added config option for watchFile
Diffstat (limited to 'src')
-rw-r--r-- | src/Config.ts | 3 | ||||
-rw-r--r-- | src/MinecraftHandler.ts | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/Config.ts b/src/Config.ts index ee24698..bcc45ef 100644 --- a/src/Config.ts +++ b/src/Config.ts @@ -1,5 +1,6 @@ export interface Config { PORT: number + DEBUG: boolean USE_WEBHOOKS: boolean WEBHOOK_URL: string @@ -18,6 +19,7 @@ export interface Config { IS_LOCAL_FILE: boolean LOCAL_FILE_PATH: string + FS_WATCH_FILE: boolean PATH_TO_MINECRAFT_SERVER_INSTALL?: string YOUR_URL?: string @@ -33,7 +35,6 @@ export interface Config { REGEX_SERVER_PREFIX: string REGEX_MATCH_CHAT_MC: string REGEX_IGNORED_CHAT: string - DEBUG: boolean SERVER_NAME: string SERVER_IMAGE: string diff --git a/src/MinecraftHandler.ts b/src/MinecraftHandler.ts index 0882d19..bddc515 100644 --- a/src/MinecraftHandler.ts +++ b/src/MinecraftHandler.ts @@ -190,7 +190,7 @@ class MinecraftHandler { private initTail (callback: Callback) { if (fs.existsSync(this.config.LOCAL_FILE_PATH)) { console.log(`[INFO] Using configuration for local log file at "${this.config.LOCAL_FILE_PATH}"`) - this.tail = new Tail(this.config.LOCAL_FILE_PATH, {useWatchFile: true}) + this.tail = new Tail(this.config.LOCAL_FILE_PATH, {useWatchFile: this.config.FS_WATCH_FILE ?? true}) } else { throw new Error(`[ERROR] Local log file not found at "${this.config.LOCAL_FILE_PATH}"`) } |