promotion 1.3.5 → 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ == Version 1.3.6
2
+ - Allow multiple daemon entries, if they use the Name attribute.
3
+
1
4
  == Version 1.3.5
2
5
  - Schedule in newsyslog handles $-formats (starting with 'D', 'W', or 'M')
3
6
  and @-formats (containing 'T') as well as integer hours and '*'
data/README CHANGED
@@ -221,8 +221,10 @@ the destination folder specified.
221
221
 
222
222
  === +Daemon+
223
223
  To enable an application to startup automatically, a +Daemon+ element is needed. The name of the
224
- startup script is expected to be <code>/etc/rc.d/myapp</code>.
224
+ startup script is expected to be <code>/etc/rc.d/myapp</code>, but may be overridden by the
225
+ optional +Name+ attribute.
225
226
  <Daemon Flags="" Priority="10" User="" />
227
+ <Daemon Flags="-d $MYAPP_HOME" Priority="20" User="_myapp" Name="otherapp"/>
226
228
 
227
229
  The +Flags+ attribute contains the command line options provided to the executable by
228
230
  <code>/etc/rc.conf.local</code>.
@@ -32,7 +32,8 @@ module Rcconf
32
32
  }
33
33
  pkgScripts = []
34
34
  daemonSpecs.each { |spec|
35
- name = spec.attributes["Name"]
35
+ # Name defaults to the name of the spec, but may be overridden by the optional Name attribute
36
+ name = spec.elements["/Specification/Daemon"].attributes["Name"] || spec.attributes["Name"]
36
37
  flags = spec.elements["/Specification/Daemon"].attributes["Flags"]
37
38
  contents << "#{name}_flags=\"#{flags}\" \n"
38
39
  pkgScripts << name
data/promotion.xsd CHANGED
@@ -16,7 +16,7 @@
16
16
  <xsd:element ref="Allfiles" minOccurs="0" maxOccurs="unbounded" />
17
17
  <xsd:element ref="Zipfile" minOccurs="0" maxOccurs="unbounded" />
18
18
  <xsd:element ref="Sudoers" minOccurs="0" maxOccurs="1" />
19
- <xsd:element ref="Daemon" minOccurs="0" maxOccurs="1" />
19
+ <xsd:element ref="Daemon" minOccurs="0" maxOccurs="unbounded" />
20
20
  <xsd:element ref="Environment" minOccurs="0" maxOccurs="1" />
21
21
  <xsd:element ref="Crontab" minOccurs="0" maxOccurs="1" />
22
22
  <xsd:element ref="Database" minOccurs="0" maxOccurs="1" />
@@ -288,6 +288,7 @@
288
288
  <xsd:attribute name="Priority" type="xsd:nonNegativeInteger" use="optional" />
289
289
  <xsd:attribute name="Flags" type="xsd:string" use="required" />
290
290
  <xsd:attribute name="User" type="xsd:string" use="required" />
291
+ <xsd:attribute name="Name" type="xsd:NMTOKEN" use="optional" />
291
292
  </xsd:attributeGroup>
292
293
 
293
294
  <xsd:simpleType name="MODE">
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: promotion
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 5
10
- version: 1.3.5
9
+ - 6
10
+ version: 1.3.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Richard Kernahan
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-09-27 00:00:00 Z
18
+ date: 2012-09-29 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: log4r