Rewrite of the module to support debian and redhat based linux distributions

... Redhat and Debian based linux distributions.