Sha256: 85dd6c335acb03833c35ed13c9976bc1be7c74d100ab1f2c89a0a2fa53af1339
Contents?: true
Size: 728 Bytes
Versions: 7
Compression:
Stored size: 728 Bytes
Contents
require 'pty' # # # module MKIt class HAProxy def initialize # configs # run standalone | daemon @running = false end def start @thread ||= Thread.new { while (@running) do cmd = "/usr/sbin/haproxy -f /etc/haproxy/haproxy.d" %x{#{cmd}} sleep 1 end } @thread.run puts "haproxy started" end def start @running = true @thread ||= Thread.new { while (@running) do %{/usr/sbin/haproxy -f /etc/haproxy/haproxy.d/} sleep(1) end } puts "proxy started" end def stop puts "proxy stopped" end def status end def reload end end end
Version data entries
7 entries across 7 versions & 1 rubygems