aboutsummaryrefslogtreecommitdiff
path: root/src/modules/kill.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/kill.js')
-rw-r--r--src/modules/kill.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/modules/kill.js b/src/modules/kill.js
index e0e93fc..3c93f7b 100644
--- a/src/modules/kill.js
+++ b/src/modules/kill.js
@@ -6,7 +6,7 @@ async function kill(process_name) {
let proc = process_name;
let cmd = (() => {
switch (process.platform) {
- case "linux": return "killall " + proc;
+ case "linux": return "killall -9 " + proc;
case "win32": return "taskkill /IM " + proc + " /F";
}
})();
@@ -31,4 +31,16 @@ kill.origin = async () => {
return false;
}
+kill.game = async () => {
+ let tf2 = await kill("Titanfall2.exe");
+ let northstar = await kill("NorthstarLauncher.exe");
+ let tf2_unpacked = await kill("Titanfall2-unpacked.exe");
+
+ if (tf2 || northstar || tf2_unpacked) {
+ return true;
+ }
+
+ return false;
+}
+
module.exports = kill;