archive_update_flag = false
distribution_update_flag = false
+ # reload pkg list from newest pkg list file
+ reload_distribution_information()
+
# check distribution's server_url
if @server_url.empty? then
@log.error("This distribution has not remote server", Log::LV_USER)
pkg_list_update_flag = true
end
end
-
update_pkg_list = []
for os in @support_os_list
# distribution name -> server_url hash
@dist_to_server_url = {}
@integrity = "YES"
+ @auto_sync_flag = "NO"
@finish = false
@port = 3333
@test_time=0 #test time in mili-seconds
- @lock_file=nil
+ @lock_file= nil
@sync_interval = 3600
@passwd = ""
File.open( @config_file_path, "w" ) do |f|
f.puts "location : #{@location}"
f.puts "integrity check : #{@integrity}"
- f.puts "auto sync interval : #{@sync_interval}"
+ f.puts "auto sync : #{@auto_sync_flag}"
+ f.puts "sync interval : #{@sync_interval}"
f.puts "server_url : #{dist_name} -> #{server_url}"
end
listener.start
# set auto sync
- @log.info "Setting auto sync..."
- autosync = DistSync.new(self)
- autosync.start
+ if @auto_sync_flag.eql? "YES" then
+ @log.info "Setting auto sync..."
+ autosync = DistSync.new(self)
+ autosync.start
+ end
# set password
@passwd = passwd
@location = l.split(" :")[1].strip
elsif l.start_with?( "integrity check :") then
@integrity = l.split(" :")[1].strip.upcase
- elsif l.start_with?( "auto sync interval :" ) then
+ elsif l.start_with?( "auto sync :" ) then
+ @auto_sync_flag = l.split(" :")[1].strip.upcase
+ elsif l.start_with?( "sync interval :" ) then
@sync_interval = l.split(" :")[1].strip.to_i
elsif l.start_with?( "server_url :" ) then
info = l.split(" :")[1].split("->")