|
|
|
@ -82,6 +82,7 @@ class ServiceDefinition
|
|
|
|
|
getter directory : String?
|
|
|
|
|
getter user : String?
|
|
|
|
|
getter group : String?
|
|
|
|
|
getter start_as_root : Bool?
|
|
|
|
|
getter provides : String?
|
|
|
|
|
getter consumes : Array(Consumes)
|
|
|
|
|
getter environment_variables : Array(String)
|
|
|
|
@ -103,6 +104,7 @@ class ServiceDefinition
|
|
|
|
|
@directory = specs["directory"]?.try &.as_s
|
|
|
|
|
@user = specs["user"]?.try &.as_s
|
|
|
|
|
@group = specs["group"]?.try &.as_s
|
|
|
|
|
@start_as_root = specs["start-as-root"]?.try(&.as_s).try(&.==("true")) || false
|
|
|
|
|
@provides = specs["provides"]?.try &.as_a_or_s.map { |x| Provides.new x } || Array(Provides).new
|
|
|
|
|
@consumes = specs["consumes"]?.try &.as_a_or_s.map { |x| Consumes.new x } || Array(Consumes).new
|
|
|
|
|
@environment_variables = specs["environment-variables"]?.try &.as_a_or_s || Array(String).new
|
|
|
|
|