diff --git a/src/im_mad/remotes/lxc-probes.d/vm/monitor/poll.rb b/src/im_mad/remotes/lxc-probes.d/vm/monitor/poll.rb index 854362c712..e9a4060e4b 100755 --- a/src/im_mad/remotes/lxc-probes.d/vm/monitor/poll.rb +++ b/src/im_mad/remotes/lxc-probes.d/vm/monitor/poll.rb @@ -1,5 +1,23 @@ #!/usr/bin/ruby +ONE_LOCATION = ENV['ONE_LOCATION'] unless defined?(ONE_LOCATION) + +if !ONE_LOCATION + LIB_LOCATION ||= '/usr/lib/one' + RUBY_LIB_LOCATION ||= '/usr/lib/one/ruby' + GEMS_LOCATION ||= '/usr/share/one/gems' +else + LIB_LOCATION ||= ONE_LOCATION + '/lib' + RUBY_LIB_LOCATION ||= ONE_LOCATION + '/lib/ruby' + GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' +end + +# %%RUBYGEMS_SETUP_BEGIN%% +require 'load_opennebula_paths' +# %%RUBYGEMS_SETUP_END%% + +$LOAD_PATH << RUBY_LIB_LOCATION + require_relative '../../../lib/lxc' puts DomainList.info