Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Add hook to gracefully shutdown rocketchat

Open ghost opened this issue 10 years ago • 6 comments

Hello Devs.

How am i supposed to stop rocketchat? I'm trying to write an initscript but it's not clear to me how to stop the application. Do i really have to work with ps auxx and kill?

thanks and cheers t.

ghost avatar Jan 25 '16 15:01 ghost

Are you running Rocket.Chat simply via meteor? If so, I usually just kill -9 [pid] when I need to restart it, stop it, or pull new code.

k0nsl avatar Jan 25 '16 17:01 k0nsl

@himbeere - thanks, I've converted this ticket to a feature request for a shutdown hook.

We already have a restart button; we need a hook (via a route and shared secret token?) to gracefully shutdown the server.

Sing-Li avatar Jan 27 '16 22:01 Sing-Li

if i try doing the kill option it keeps coming back up, even if i kill it as root.

mikrobyte avatar Feb 26 '16 15:02 mikrobyte

sudo pm2 stop 0

mikrobyte avatar Feb 26 '16 16:02 mikrobyte

Are you wanting a route to call or just for Rocket.Chat to handle shutdown gracefully?

Because to do that we'd just need to handle SIGTERM and maybe SIGHUP (windows)

geekgonecrazy avatar May 12 '16 03:05 geekgonecrazy

We aim to keep our Github issues for bugs and feature requests. This does not fit that criteria. Please see our guidelines for support. If you feel like we are closing in error, please re-open and add additional details about the bug or feature request.

MartinSchoeler avatar Mar 09 '18 13:03 MartinSchoeler