web_server_config_generator 0.0.2 → 0.0.3
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.
- data/bin/web_server_setup +11 -12
- metadata +2 -2
data/bin/web_server_setup
CHANGED
|
@@ -356,7 +356,7 @@ module WebServerSetup
|
|
|
356
356
|
end
|
|
357
357
|
|
|
358
358
|
def web_server_links_dir
|
|
359
|
-
|
|
359
|
+
config_dir + "links"
|
|
360
360
|
end
|
|
361
361
|
|
|
362
362
|
def projects_dir
|
|
@@ -364,16 +364,19 @@ module WebServerSetup
|
|
|
364
364
|
end
|
|
365
365
|
|
|
366
366
|
def web_server_sub_uri_apps_dir
|
|
367
|
-
|
|
367
|
+
config_dir + "sub_uri_apps"
|
|
368
368
|
end
|
|
369
369
|
|
|
370
370
|
private
|
|
371
371
|
|
|
372
372
|
def config_dir
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
373
|
+
@config_dir ||=
|
|
374
|
+
begin
|
|
375
|
+
Directory.new $WEB_SERVER_FILES_DIR || begin
|
|
376
|
+
raise "Couldn't fine $HOME" unless home_dir = ENV["HOME"]
|
|
377
|
+
File.join(home_dir, ".webconfig")
|
|
378
|
+
end
|
|
379
|
+
end
|
|
377
380
|
end
|
|
378
381
|
|
|
379
382
|
def global_config(reload = false)
|
|
@@ -390,12 +393,8 @@ module WebServerSetup
|
|
|
390
393
|
File.join(config_dir, "global_config.yml")
|
|
391
394
|
end
|
|
392
395
|
|
|
393
|
-
def web_server_files_dir
|
|
394
|
-
$WEB_SERVER_FILES_DIR ? Directory.new($WEB_SERVER_FILES_DIR) : config_dir
|
|
395
|
-
end
|
|
396
|
-
|
|
397
396
|
def web_server_vhost_dir
|
|
398
|
-
|
|
397
|
+
config_dir + "vhost"
|
|
399
398
|
end
|
|
400
399
|
|
|
401
400
|
def web_server_vhost_nginx_dir
|
|
@@ -509,4 +508,4 @@ pp web_server_setup.environments if $VERBOSE
|
|
|
509
508
|
web_server_setup.check_nginx_conf
|
|
510
509
|
|
|
511
510
|
web_server_setup.prompt_to_restart_nginx
|
|
512
|
-
|
|
511
|
+
|