added init.d support