Add sudo for redir
This commit is contained in:
parent
2e2c2fad56
commit
fd948f8552
2 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ module Vagrant
|
||||||
redir_pids.each do |pid|
|
redir_pids.each do |pid|
|
||||||
next unless is_redir_pid?(pid)
|
next unless is_redir_pid?(pid)
|
||||||
@logger.debug "Killing pid #{pid}"
|
@logger.debug "Killing pid #{pid}"
|
||||||
system "pkill -TERM -P #{pid}"
|
system "sudo pkill -TERM -P #{pid}"
|
||||||
end
|
end
|
||||||
|
|
||||||
@logger.info "Removing redir pids files"
|
@logger.info "Removing redir pids files"
|
||||||
|
|
|
@ -79,7 +79,7 @@ module Vagrant
|
||||||
params = %W( --lport=#{host_port} --caddr=#{guest_ip} --cport=#{guest_port} )
|
params = %W( --lport=#{host_port} --caddr=#{guest_ip} --cport=#{guest_port} )
|
||||||
params.unshift "--laddr=#{host_ip}" if host_ip
|
params.unshift "--laddr=#{host_ip}" if host_ip
|
||||||
params << '--syslog' if ENV['REDIR_LOG']
|
params << '--syslog' if ENV['REDIR_LOG']
|
||||||
redir_cmd = "redir #{params.join(' ')} 2>/dev/null"
|
redir_cmd = "sudo redir #{params.join(' ')} 2>/dev/null"
|
||||||
|
|
||||||
@logger.debug "Forwarding port with `#{redir_cmd}`"
|
@logger.debug "Forwarding port with `#{redir_cmd}`"
|
||||||
spawn redir_cmd
|
spawn redir_cmd
|
||||||
|
|
Loading…
Reference in a new issue