apacheconf 1.0.0 → 1.0.1
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.tar.gz.sig +0 -0
- data/lib/add_apache_site.rb +10 -5
- data/lib/apacheconf.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/add_apache_site.rb
CHANGED
@@ -24,21 +24,26 @@ template = file:'vhost.erb'
|
|
24
24
|
|
25
25
|
if should_enable
|
26
26
|
enable(config)
|
27
|
-
|
28
|
-
error "=> #{config['site_name']} enabled"
|
27
|
+
puts "=> #{config['site_name']} enabled"
|
29
28
|
end
|
30
29
|
|
31
30
|
if should_disable
|
32
31
|
disable(config)
|
33
|
-
|
34
|
-
error "=> #{config['site_name']} disabled"
|
32
|
+
puts "=> #{config['site_name']} disabled"
|
35
33
|
end
|
36
34
|
|
37
35
|
if File.exists?(out_file = get_out_file(config)) && !overwrite
|
36
|
+
reload_apache
|
38
37
|
error "=> #{out_file} already exists, won't overwrite it. Quitting."
|
39
38
|
else
|
40
|
-
|
39
|
+
begin
|
40
|
+
open(out_file, 'w+').write(ERB.new(File.read(template), nil, '>').result(binding))
|
41
|
+
rescue Errno::EACCES => msg
|
42
|
+
reload_apache
|
43
|
+
error "=> Unable to write config. You must run apacheconf as sudo."
|
44
|
+
end
|
41
45
|
puts "=> Wrote #{out_file} successfully."
|
46
|
+
reload_apache
|
42
47
|
end
|
43
48
|
|
44
49
|
|
data/lib/apacheconf.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: apacheconf
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.0.
|
7
|
-
date: 2007-09-
|
6
|
+
version: 1.0.1
|
7
|
+
date: 2007-09-28 00:00:00 +01:00
|
8
8
|
summary: Simple config generator for apache the debian way.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
metadata.gz.sig
CHANGED
Binary file
|