vagrant-reverse-proxy 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5afc6f0add3b80d836ec3c2213d457bb11876a3
4
- data.tar.gz: b95de26303e6bc4f8e5ef010e93935364f92694f
3
+ metadata.gz: 5e2facf6c88535e8a22e418bb597f01aeb4983b1
4
+ data.tar.gz: fb6418e7b942257256a04c0b003fef2e3eca769a
5
5
  SHA512:
6
- metadata.gz: bcc2c346c8fa987eab7bed882a33619b25e72a2fbee9191a7ce75e2f997f4fe841784e173b274d79f7cc365dd5ab3f23dc03da60a797de79ceb4cee056f37bb0
7
- data.tar.gz: ac6e4a7fd17913ae04119176e6ad9dbc15888f7bf2464968b27943e3ab2e499551269d6e2f69df49494054025557fbe45675c24b0740944ced4a3b3fe71d5b18
6
+ metadata.gz: 1b43f8b65f6abb756e446c10bf536f008935d219db23add109424ee8d5737d7464b3fe1c975a9fc7c616c5cb3db4c9c07d0dae4ab10f16b510a4bc8b6efe5b60
7
+ data.tar.gz: 419574d9d2630415df68c6cdfae8704b36d0bdfff067c55332dac7c27bfd29bb25446290f09c7fb158afb73c85689c94cdc7acfcf85ac145353ff7b6bb8163e8
@@ -15,8 +15,13 @@ module VagrantPlugins
15
15
  return unless @config.reverse_proxy.enabled?
16
16
 
17
17
  # Determine temp file and target file
18
+ nginx_dir = '/etc/nginx'
19
+ unless File.directory?(nginx_dir)
20
+ env[:ui].error("Could not update nginx configuration: directory '#{nginx_dir}' does not exist. Continuing without proxy...")
21
+ return
22
+ end
23
+ nginx_site = "#{nginx_dir}/vagrant-proxy-config"
18
24
  tmp_file = @global_env.tmp_path.join('nginx.vagrant-proxies')
19
- nginx_site = '/etc/nginx/vagrant-proxy-config'
20
25
 
21
26
  env[:ui].info('Updating nginx configuration. Administrator privileges will be required...')
22
27
 
@@ -27,7 +32,7 @@ module VagrantPlugins
27
32
  end
28
33
 
29
34
  Kernel.system('sudo', 'cp', tmp_file.to_s, nginx_site)
30
- Kernel.system('sudo', 'systemctl', 'reload', 'nginx')
35
+ Kernel.system('sudo', 'service', 'reload', 'nginx')
31
36
  end
32
37
 
33
38
  def server_block(machine)
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module ReverseProxy
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-reverse-proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Bex
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-15 00:00:00.000000000 Z
11
+ date: 2016-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler