foreman_debian 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d36c851de35ae04015e73084baa78e2db1fe9656
|
4
|
+
data.tar.gz: e49cab29d9fc6700bf3c331a941a03bd99b3fd69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31d5bdb8ee1d54c3f89e4f4479fe7cd2af8b4fc696c07bf7c0e09f9a9bce7ca248f1389edc90fdda1e12941d30cf2afa781d44913ad4f2d49aca4dfb798b5f93
|
7
|
+
data.tar.gz: 7c5eed98bcbffef0787d8cda426a55215f2dbca41f77686aefa32517d09ba9abb5b457c2750c9ac81b408aa46e636b5a4b78db1b3a9d987064203d7afd4c0a79
|
@@ -16,6 +16,10 @@ module ForemanDebian
|
|
16
16
|
:attribute_name => :working_dir,
|
17
17
|
:default => Dir.getwd
|
18
18
|
|
19
|
+
option %w(-R --retry), '<timeout|schedule>', 'Timeout or schedule when stopping (see man start-stop-daemon)',
|
20
|
+
:attribute_name => :timeout_schedule,
|
21
|
+
:default => '20'
|
22
|
+
|
19
23
|
def execute
|
20
24
|
jobs = {}
|
21
25
|
procfile.entries do |name, command|
|
@@ -11,13 +11,13 @@ module ForemanDebian
|
|
11
11
|
setup
|
12
12
|
end
|
13
13
|
|
14
|
-
def create_script(name, command, user)
|
14
|
+
def create_script(name, command, user, timeout_schedule = '20')
|
15
15
|
pidfile = pidfile(name)
|
16
16
|
args = Shellwords.split(command)
|
17
17
|
script = args.shift
|
18
18
|
name = "#{@app}-#{name}"
|
19
19
|
script_path = @export_path.join(name)
|
20
|
-
Script.new(script_path, name, name, user, script, args, pidfile)
|
20
|
+
Script.new(script_path, name, name, user, script, args, pidfile, timeout_schedule)
|
21
21
|
end
|
22
22
|
|
23
23
|
def install(script)
|
@@ -2,9 +2,9 @@ module ForemanDebian
|
|
2
2
|
module Initd
|
3
3
|
class Script < Template::Storage
|
4
4
|
|
5
|
-
attr_reader :path, :name, :description, :user, :script, :arguments, :pidfile
|
5
|
+
attr_reader :path, :name, :description, :user, :script, :arguments, :pidfile, :timeout_schedule
|
6
6
|
|
7
|
-
def initialize(path, name, description, user, script, arguments, pidfile)
|
7
|
+
def initialize(path, name, description, user, script, arguments, pidfile, timeout_schedule)
|
8
8
|
@path = path
|
9
9
|
@name = name
|
10
10
|
@description = description
|
@@ -12,6 +12,7 @@ module ForemanDebian
|
|
12
12
|
@script = script
|
13
13
|
@arguments = arguments
|
14
14
|
@pidfile = pidfile
|
15
|
+
@timeout_schedule = timeout_schedule
|
15
16
|
end
|
16
17
|
|
17
18
|
def render
|
data/templates/initd_script.erb
CHANGED
@@ -36,7 +36,7 @@ case "${1}" in
|
|
36
36
|
;;
|
37
37
|
stop)
|
38
38
|
log_daemon_msg "Stopping ${DESC}" "${NAME}"
|
39
|
-
if (start-stop-daemon --stop --oknodo --retry
|
39
|
+
if (start-stop-daemon --stop --oknodo --retry <%= Shellwords.escape timeout_schedule %> --pidfile $PIDFILE --chuid $DAEMON_USER); then
|
40
40
|
log_end_msg 0
|
41
41
|
else
|
42
42
|
log_end_msg 1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_debian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cargomedia
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-09-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: clamp
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.4.1
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Foreman wrapper for debian
|