rewrite nginx_stop function using kil function - dry