Graceful shutdown for btsync