exit service gracefully.