Sha256: e4a085c085ebb9d4729612d26d4892a1917da28ea0182f37857df129ee4a1971

Contents?: true

Size: 745 Bytes

Versions: 72

Compression:

Stored size: 745 Bytes

Contents

#!/usr/bin/ruby
# This file is overwritten by 'vagrant provision'. For the source,
# see dev/vagrant/nginx_start in the Phusion Passenger source
# tree.

ENV['PASSENGER_BEEP_ON_ABORT'] = '1'

def run_in_bg(*command)
  return fork do
    Process.setsid
    exec(*command)
  end
end

File.open('inst/logs/error.log', 'a') do |f|
  f.write("\n\n\n\n-------------- NGINX START #{Time.now} --------------\n\n\n\n")
end

tail_pid = run_in_bg("tail -n 0 -f inst/logs/error.log")
nginx_pid = run_in_bg("./objs/nginx", *ARGV)
begin
  Process.waitpid(nginx_pid)
  nginx_pid = nil
rescue Interrupt
ensure
  Process.kill('INT', tail_pid)
  Process.waitpid(tail_pid)
  if nginx_pid
    Process.kill('INT', nginx_pid)
    Process.waitpid(nginx_pid)
  end
end

Version data entries

72 entries across 72 versions & 2 rubygems

Version Path
passenger-5.3.5 dev/vagrant/nginx_start
passenger-5.3.4 dev/vagrant/nginx_start
passenger-5.3.3 dev/vagrant/nginx_start
passenger-5.3.2 dev/vagrant/nginx_start
passenger-5.3.1 dev/vagrant/nginx_start
passenger-5.3.0 dev/vagrant/nginx_start
passenger-5.2.3 dev/vagrant/nginx_start
passenger-5.2.2 dev/vagrant/nginx_start
passenger-5.2.1 dev/vagrant/nginx_start
passenger-5.2.0 dev/vagrant/nginx_start
passenger-5.1.12 dev/vagrant/nginx_start
passenger-5.1.11 dev/vagrant/nginx_start
passenger-5.1.10 dev/vagrant/nginx_start
passenger-5.1.9 dev/vagrant/nginx_start
passenger-5.1.8 dev/vagrant/nginx_start
passenger-5.1.7 dev/vagrant/nginx_start
passenger-5.1.6 dev/vagrant/nginx_start
passenger-5.1.5 dev/vagrant/nginx_start
passenger-5.1.4 dev/vagrant/nginx_start
passenger-5.1.3 dev/vagrant/nginx_start