Added support for Red Hat 7

Main problem is that RHel7 use systemd so I add to do some changes to add support to rhel 7 without breaking anything else.

Tested on Rhel 7 while using it also on Hel6 and debian and all seem to work fine.