1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

Bug in accounting: src/acct/watch_helper.rb was not working in system-wide installations

This commit is contained in:
Carlos Martín 2011-07-18 16:27:01 +02:00
parent f4927c3163
commit 2025457987

View File

@ -5,13 +5,16 @@ module WatchHelper
ONE_LOCATION=ENV["ONE_LOCATION"]
if !ONE_LOCATION
ACCTD_CONF="/etc/one/acctd.conf"
ACCT_DB="/var/one/oneacct.db"
VAR_LOCATION = "/var/lib/one"
ETC_LOCATION = "/etc/one"
else
ACCTD_CONF=ONE_LOCATION+"/etc/acctd.conf"
ACCT_DB=ONE_LOCATION+"/var/oneacct.db"
VAR_LOCATION = ONE_LOCATION + "/var"
ETC_LOCATION = ONE_LOCATION + "/etc"
end
ACCTD_CONF = ETC_LOCATION + "/acctd.conf"
ACCT_DB = VAR_LOCATION + "/oneacct.db"
CONF = YAML.load_file(ACCTD_CONF)
if CONF[:DB]