Add hosts entry and remove nginx entry on kill