Shutting down an SFTP server in error causes a nil pointer dereference
If an SFTP service failed to start, shutting down the gateway will cause a panic because the SFTP server will try to stop a nil listener.
To avoid this issue (and similar issues with other services), when a shutdown signal is received, the main service should only try to stop RUNNING
services. OFFLINE
and ERROR
services should be ignored.