fix: restore runtime close hook and implement graceful shutdown env vars
#4017
+192
β13
Loading