class Falcon::Controller::Virtual
def setup(container)
These processes are gracefully restarted if they are already running.
Setup the container with {Redirect} and {Proxy} child processes.
def setup(container) if proxy = container[:proxy] proxy.kill(:HUP) end if redirect = container[:redirect] redirect.kill(:HUP) end container.reload do @command.resolved_paths do |path| path = File.expand_path(path) root = File.dirname(path) spawn(path, container, chdir: root) end container.spawn(name: "Falcon Redirector", restart: true, key: :redirect) do |instance| instance.exec(falcon_path, "redirect", "--bind", @command.bind_insecure, "--timeout", @command.timeout.to_s, "--redirect", @command.bind_secure, *@command.paths, ready: false ) end container.spawn(name: "Falcon Proxy", restart: true, key: :proxy) do |instance| instance.exec(falcon_path, "proxy", "--bind", @command.bind_secure, "--timeout", @command.timeout.to_s, *@command.paths, ready: false ) end end end