pleaserun 0.0.16 → 0.0.17

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: 285e8687da96da9e598aee6d7e1172a4a06a4612
4
- data.tar.gz: 5574056db684c58c8dff19eecc62c4612ff08084
3
+ metadata.gz: 6c371eb9b2f8b78cf1ad9a8ae5129a9742386e91
4
+ data.tar.gz: d16ad0c63c9dc26192ae18bc72ca01a33d8a28b6
5
5
  SHA512:
6
- metadata.gz: 3c29e32c070ba54e5c02f9fc4c1f1cd809a6a02dada6081b60114ee9298d9ae8d72af12fc71fe2a74b99252dafe0c575c319d87ef0d5183e61fcaba569250bc6
7
- data.tar.gz: 35d61cafe539a1df9fe767946c6b115d85289b99643f8686f7f5b424003c81075a6592f30953dc74cc42bbfca82437bc53d52061f6ce54d289e36fb086370045
6
+ metadata.gz: d3147ecf4ccd30e852bfde20d9c5d67a3f8eedc5a610fde7ac047e32a345acc9ad13f55d8ce1c27d49b8330a32352d49fef8692435379d07bab598b166d35d83
7
+ data.tar.gz: b15a188ce0ae49b661bbca638a9ba20e720ee8b5a89a4e9150e279cc04685b192d664a4503c2166c4a8f51bc6773593193c87f0c06ef93141e194cc6cc9378b2
data/CHANGELOG.asciidoc CHANGED
@@ -1,5 +1,8 @@
1
1
  = Pleaserun Changes and Releases
2
2
 
3
+ == 0.0.17 (May 4, 2016)
4
+ * Added detection for Fedora 22 and 23, OS X 10.11, and Ubuntu 14.10, 15.04, 15.50, and 16.04. (#98, Aaron Mildenstein)
5
+
3
6
  == 0.0.13 (April 30, 2015)
4
7
  * Now supports MRI 1.9.3 (Vincent Janelle)
5
8
  * cli: New flag --install-prefix. This lets you tell pleaserun what directory to write things.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pleaserun (0.0.12)
4
+ pleaserun (0.0.16)
5
5
  cabin (> 0)
6
6
  clamp
7
7
  insist
@@ -11,10 +11,10 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- cabin (0.7.1)
14
+ cabin (0.8.1)
15
15
  celluloid (0.16.0)
16
16
  timers (~> 4.0.0)
17
- clamp (0.6.4)
17
+ clamp (1.0.0)
18
18
  coderay (1.1.0)
19
19
  diff-lcs (1.2.5)
20
20
  ffi (1.9.6)
@@ -104,7 +104,7 @@ GEM
104
104
  slop (3.6.0)
105
105
  spoon (0.0.4)
106
106
  ffi
107
- stud (0.0.19)
107
+ stud (0.0.22)
108
108
  systemu (2.6.5)
109
109
  thor (0.19.1)
110
110
  timers (4.0.1)
@@ -124,3 +124,6 @@ DEPENDENCIES
124
124
  peach
125
125
  pleaserun!
126
126
  rspec (~> 3.0.0)
127
+
128
+ BUNDLED WITH
129
+ 1.11.2
@@ -19,6 +19,10 @@ class PleaseRun::Detector
19
19
  ["fedora", "18"] => ["systemd", "default"],
20
20
  ["fedora", "19"] => ["systemd", "default"],
21
21
  ["fedora", "20"] => ["systemd", "default"],
22
+ ["fedora", "21"] => ["systemd", "default"],
23
+ ["fedora", "22"] => ["systemd", "default"],
24
+ ["fedora", "23"] => ["systemd", "default"],
25
+ ["mac_os_x", "10.11"] => ["launchd", "10.9"],
22
26
  ["mac_os_x", "10.10"] => ["launchd", "10.9"],
23
27
  ["mac_os_x", "10.8"] => ["launchd", "10.9"],
24
28
  ["mac_os_x", "10.9"] => ["launchd", "10.9"],
@@ -28,7 +32,11 @@ class PleaseRun::Detector
28
32
  ["ubuntu", "12.10"] => ["upstart", "1.5"],
29
33
  ["ubuntu", "13.04"] => ["upstart", "1.5"],
30
34
  ["ubuntu", "13.10"] => ["upstart", "1.5"],
31
- ["ubuntu", "14.04"] => ["upstart", "1.5"]
35
+ ["ubuntu", "14.04"] => ["upstart", "1.5"],
36
+ ["ubuntu", "14.10"] => ["upstart", "1.5"],
37
+ ["ubuntu", "15.04"] => ["systemd", "default"],
38
+ ["ubuntu", "15.10"] => ["systemd", "default"],
39
+ ["ubuntu", "16.04"] => ["systemd", "default"]
32
40
  }
33
41
 
34
42
  def self.detect
data/pleaserun.gemspec CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |spec|
2
2
  files = File.read(__FILE__)[/^__END__$.*/m].split("\n")[1..-1]
3
3
 
4
4
  spec.name = "pleaserun"
5
- spec.version = "0.0.16"
5
+ spec.version = "0.0.17"
6
6
  spec.summary = "pleaserun"
7
7
  spec.description = "pleaserun"
8
8
  spec.license = "Apache 2.0"
@@ -7,11 +7,14 @@ Description={{{ description }}}
7
7
  Type=simple
8
8
  User={{{ user }}}
9
9
  Group={{{ group }}}
10
+ EnvironmentFile=/etc/default/{{{name}}}
11
+ EnvironmentFile=/etc/sysconfig/{{{name}}}
10
12
  ExecStart={{{program}}} {{{shell_args}}}
11
13
  {{#prestart}}
12
14
  ExecStartPre=/lib/systemd/system/{{{name}}}-prestart.sh
13
15
  {{/prestart}}
14
16
  Restart=always
17
+ WorkingDirectory={{{chdir}}}
15
18
 
16
19
  [Install]
17
20
  WantedBy=multi-user.target
@@ -12,3 +12,8 @@ nice="{{{nice}}}"
12
12
  {{/limit_open_files}}{{#limit_user_processes}}limit_user_processes="{{{limit_user_processes}}}"
13
13
  {{/limit_user_processes}}{{#limit_physical_memory}}limit_physical_memory="{{{limit_physical_memory}}}"
14
14
  {{/limit_physical_memory}}{{#limit_stack_size}}limit_stack_size="{{{limit_stack_size}}}"{{/limit_stack_size}}
15
+
16
+ # If this is set to 1, then when `stop` is called, if the process has
17
+ # not exited within a reasonable time, SIGKILL will be sent next.
18
+ # The default behavior is to simply log a message "program stop failed; still running"
19
+ KILL_ON_STOP_TIMEOUT=0
@@ -88,7 +88,13 @@ stop() {
88
88
  sleep 1
89
89
  done
90
90
  if status ; then
91
- emit "$name stop failed; still running."
91
+ if [ "$KILL_ON_STOP_TIMEOUT" -eq 1 ] ; then
92
+ trace "Timeout reached. Killing $name (pid $pid) with SIGKILL. This may result in data loss."
93
+ kill -KILL $pid
94
+ emit "$name killed with SIGKILL."
95
+ else
96
+ emit "$name stop failed; still running."
97
+ fi
92
98
  else
93
99
  emit "$name stopped."
94
100
  fi
@@ -157,7 +163,7 @@ case "$1" in
157
163
  ;;
158
164
  stop) stop ;;
159
165
  force-stop) force_stop ;;
160
- status)
166
+ status)
161
167
  status
162
168
  code=$?
163
169
  if [ $code -eq 0 ] ; then
@@ -167,11 +173,11 @@ case "$1" in
167
173
  fi
168
174
  exit $code
169
175
  ;;
170
- restart)
176
+ restart)
171
177
  {{#prestart}}if [ "$PRESTART" != "no" ] ; then
172
178
  prestart || exit $?
173
179
  fi{{/prestart}}
174
- stop && start
180
+ stop && start
175
181
  ;;
176
182
  *)
177
183
  echo "Usage: $SCRIPTNAME {start|force-start|stop|force-start|force-stop|status|restart}" >&2
@@ -4,22 +4,44 @@ stop on runlevel [!2345]
4
4
 
5
5
  respawn
6
6
  umask {{{umask}}}
7
- #nice {{{nice}}}
8
- #chroot {{{chroot}}}
7
+ {{#nice}}
8
+ nice {{{nice}}}
9
+ {{/nice}}
10
+ {{#chroot}}
11
+ chroot {{{chroot}}}
12
+ {{/chroot}}
9
13
  chdir {{{chdir}}}
10
- #limit core <softlimit> <hardlimit>
11
- #limit cpu <softlimit> <hardlimit>
12
- #limit data <softlimit> <hardlimit>
13
- #limit fsize <softlimit> <hardlimit>
14
- #limit memlock <softlimit> <hardlimit>
14
+ {{#limit_coredump}}
15
+ limit core {{{limit_coredump}}} {{{limit_coredump}}}
16
+ {{/limit_coredump}}
17
+ {{#limit_cputime}}
18
+ limit cpu {{{limit_cputime}}} {{{limit_cputime}}}
19
+ {{/limit_cputime}}
20
+ {{#limit_data}}
21
+ limit data {{{limit_data}}} {{{limit_data}}}
22
+ {{/limit_data}}
23
+ {{#limit_file_size}}
24
+ limit fsize {{{limit_file_size}}} {{{limit_file_size}}}
25
+ {{/limit_file_size}}
26
+ {{#limit_locked_memory}}
27
+ limit memlock {{{limit_locked_memory}}} {{{limit_locked_memory}}}
28
+ {{/limit_locked_memory}}
15
29
  #limit msgqueue <softlimit> <hardlimit>
16
30
  #limit nice <softlimit> <hardlimit>
17
- #limit nofile <softlimit> <hardlimit>
18
- #limit nproc <softlimit> <hardlimit>
19
- #limit rss <softlimit> <hardlimit>
31
+ {{#limit_open_files}}
32
+ limit nofile {{{limit_open_files}}} {{{limit_open_files}}}
33
+ {{/limit_open_files}}
34
+ {{#limit_user_processes}}
35
+ limit nproc {{{limit_user_processes}}} {{{limit_user_processes}}}
36
+ {{/limit_user_processes}}
37
+ {{#limit_physical_memory}}
38
+ limit rss {{{limit_physical_memory}}} {{{limit_physical_memory}}}
39
+ {{/limit_physical_memory}}
20
40
  #limit rtprio <softlimit> <hardlimit>
21
41
  #limit sigpending <softlimit> <hardlimit>
22
- #limit stack <softlimit> <hardlimit>
42
+ {{#limit_stack_size}}
43
+ limit stack {{{limit_stack_size}}} {{{limit_stack_size}}}
44
+ {{/limit_stack_size}}
23
45
  setuid {{{user}}}
24
46
  setgid {{{group}}}
25
47
  console log # log stdout/stderr to /var/log/upstart/
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pleaserun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Sissel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-04 00:00:00.000000000 Z
11
+ date: 2016-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cabin
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  version: '0'
161
161
  requirements: []
162
162
  rubyforge_project:
163
- rubygems_version: 2.4.6
163
+ rubygems_version: 2.4.8
164
164
  signing_key:
165
165
  specification_version: 4
166
166
  summary: pleaserun