lythx / trakman

Trackmania Forever server controller written in TypeScript
https://trakman.ptrk.eu
MIT License
24 stars 4 forks source link

Register signals to close controller #224

Open Skorlok opened 8 months ago

Skorlok commented 8 months ago

I use Trakman on Docker and it's boring to wait 10 seconds for the controller to get killed

process.on("SIGINT", () => { this.end(); })
process.on("SIGTERM", () => { this.end(); })
process.on("SIGHUP", () => { this.end(); })
process.on("SIGBREAK", () => { this.end(); })
process.exit(0)

this is how we do in JS

wsrvn commented 8 months ago

boring to wait 10 seconds

watch some tiktok in the meantime