class Puma::ControlCLI
def prepare_configuration
def prepare_configuration if @state unless File.exist? @state raise "State file not found: #{@state}" end require_relative 'state_file' sf = Puma::StateFile.new sf.load @state @control_url = sf.control_url @control_auth_token = sf.control_auth_token @pid = sf.pid elsif @pidfile # get pid from pid_file @pid = File.read(@pidfile, mode: 'rb:UTF-8').to_i end end