more logging

This commit is contained in:
Lea 2023-04-29 08:40:42 +02:00
parent 39b89b40ba
commit 89fb5f2d2a
Signed by: Lea
GPG key ID: 1BAFFE8347019C42

View file

@ -85,7 +85,10 @@ const runRestarts = async (status: Awaited<ReturnType<typeof periodicCheck>>) =>
result.stdout?.on('data', data => console.log(data));
result.stderr?.on('data', data => console.log(data));
result.on('exit', code => {
if (code != 0) restarting.bot = false; // Assume restart command has failed
if (code != 0) {
console.log('Bot: Restart command seems to have failed!');
restarting.bot = false;
}
});
} catch(e) {
console.log(e);
@ -100,7 +103,10 @@ const runRestarts = async (status: Awaited<ReturnType<typeof periodicCheck>>) =>
result.stdout?.on('data', data => console.log(data));
result.stderr?.on('data', data => console.log(data));
result.on('exit', code => {
if (code != 0) restarting.bridge = false;
if (code != 0) {
console.log('Bridge: Restart command seems to have failed!');
restarting.bridge = false;
}
});
} catch(e) {
console.log(e);