Sha256: 813ca1805a279c8f75f5aa7fc8bf317bca275509898df005cce2277815d032e5
Contents?: true
Size: 779 Bytes
Versions: 16
Compression:
Stored size: 779 Bytes
Contents
require 'mkit/app/model/setting' require 'mkit/config/config' module MKIt module HAProxy module_function def start %x{#{MKIt::Config.mkit.haproxy.ctrl.start}} end def stop %x{#{MKIt::Config.mkit.haproxy.ctrl.stop}} end def restart stop start end def status %x{#{MKIt::Config.mkit.haproxy.ctrl.status}} end def reload %x{#{MKIt::Config.mkit.haproxy.ctrl.reload}} end def create_config_file(filename:, data:) File.write("#{MKIt::Config.mkit.haproxy.config_dir}/#{filename}", data) end def delete_config_file(filename:) begin File.delete("#{MKIt::Config.mkit.haproxy.config_dir}/#{filename}") rescue => e puts e end end end end
Version data entries
16 entries across 16 versions & 1 rubygems