Adapted resource agent to enable work with init scripts

based on https://github.com/vuntz/openstack-resource-agents/commit/a46064e4b33d763b9f8173a20605e536f78f8c9f