capricorn 2.0.5 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ subdomain = nil if subdomain.nil? or subdomain.empty?
|
|
7
7
|
client = 'mrhenry'
|
8
8
|
|
9
9
|
user = application[:id].downcase.gsub(/[^a-z]+/, '_')
|
10
|
-
short_user = "#{user[0,
|
10
|
+
short_user = "#{user[0,10]}_#{Digest::SHA1.hexdigest(application[:id])[0,5]}"
|
11
11
|
passwd = (rand(1_000_000_000) + 10_000).to_s
|
12
12
|
|
13
13
|
db_name = application[:id].downcase.gsub(/[^a-z]+/, '_')
|
@@ -38,7 +38,8 @@ begin
|
|
38
38
|
|
39
39
|
rescue Rush::BashFailed, Errno::ENOENT
|
40
40
|
### try to create the base domain
|
41
|
-
|
41
|
+
%x{ /usr/local/psa/bin/ipmanage --ip_list } =~ /[:](\d+\.\d+\.\d+\.\d+)\//
|
42
|
+
box.bash(%{ /usr/local/psa/bin/domain -c #{basedomain} -owner #{client} -status enabled -hosting true -hst_type phys -ip #{$1} -dns true -www true -login #{short_user} -passwd #{passwd} -shell /bin/bash })
|
42
43
|
end
|
43
44
|
application_root = box["/var/www/vhosts/#{basedomain}/"]
|
44
45
|
|
data/lib/capricorn/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capricorn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 6
|
10
|
+
version: 2.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Simon Menke
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-06-
|
18
|
+
date: 2010-06-10 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|