On startup run filebeat restart upon fail

This is more of a Linux problem than a elasticsearch one. I did something like this for my elasticsearch service But I did it in a CentOS machine. Follow this guide. Pay attention to the Restart=on-failure part.