React to SIGTERM

This commit is contained in:
cn 2013-10-08 13:23:02 +02:00
parent d5f8d66422
commit a852aa4b4d
1 changed files with 4 additions and 0 deletions

View File

@ -120,6 +120,10 @@ module OpenVPNStatusWeb
OpenVPNStatusWeb.logger.info "Quitting..."
Rack::Handler::WEBrick.shutdown
end
Signal.trap('TERM') do
OpenVPNStatusWeb.logger.info "Quitting..."
Rack::Handler::WEBrick.shutdown
end
Rack::Handler::WEBrick.run app, :Host => config['host'], :Port => config['port']
end