RubyUtils/bin/trap

12 lines
202 B
Ruby
Executable File

#!/usr/bin/env ruby
$LOAD_PATH << File.join(Dir.pwd, "lib")
Signal.trap("SIGINT") do
$logger.info "SIGINT, closing the app peacefully"
$logger.close
exit 0
end
$logger.info "Starting app"
# ...