1
0
mirror of https://github.com/cmur2/openvpn-status-web.git synced 2024-12-22 12:54:24 +01:00

React to SIGTERM

This commit is contained in:
cn 2013-10-08 13:23:02 +02:00
parent d5f8d66422
commit a852aa4b4d

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