+def find_ini(option_inifile)
+ if(not option_inifile.nil?)
+ inifile = option_inifile
+ elsif(ENV.has_key?('MONITOR_RC'))
+ inifile = ENV['MONITOR_RC']
+ elsif(Process.uid == 0)
+ inifile = "/etc/monitor.rc"
+ else
+ inifile = ENV['HOME']+"/.monitorrc"
+ end
+ return inifile
+end
+
+def read_ini(ini)
+ inifile = IniFile.load(ini)
+ if(inifile.nil?)
+ puts "Initialization file not found or not readable"
+ exit
+ end