|
|
|
|
@ -35,17 +35,17 @@ require_relative 'models/userdata'
|
|
|
|
|
require_relative 'classes/cert'
|
|
|
|
|
require_relative 'classes/pagination'
|
|
|
|
|
|
|
|
|
|
# configure do
|
|
|
|
|
# Dir.mkdir('logs') unless Dir.exist?('logs')
|
|
|
|
|
# unless File.exist?('logs/actions.log')
|
|
|
|
|
# File.new('logs/actions.log', 'w').close
|
|
|
|
|
# end
|
|
|
|
|
# log_file = File.open('logs/actions.log', 'a+')
|
|
|
|
|
# STDOUT.reopen(log_file)
|
|
|
|
|
# STDERR.reopen(log_file)
|
|
|
|
|
# STDOUT.sync = true
|
|
|
|
|
# STDERR.sync = true
|
|
|
|
|
# end
|
|
|
|
|
configure do
|
|
|
|
|
Dir.mkdir('logs') unless Dir.exist?('logs')
|
|
|
|
|
unless File.exist?('logs/actions.log')
|
|
|
|
|
File.new('logs/actions.log', 'w').close
|
|
|
|
|
end
|
|
|
|
|
log_file = File.open('logs/actions.log', 'a+')
|
|
|
|
|
STDOUT.reopen(log_file)
|
|
|
|
|
STDERR.reopen(log_file)
|
|
|
|
|
STDOUT.sync = true
|
|
|
|
|
STDERR.sync = true
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
set :bind, IPBIND
|
|
|
|
|
set :port, PORT
|
|
|
|
|
|