with_pid 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/require.rb +1 -1
  2. data/templates/bash.erb +5 -1
  3. metadata +4 -4
data/require.rb CHANGED
@@ -13,7 +13,7 @@ Require do
13
13
  name 'with_pid'
14
14
  homepage "http://github.com/winton/#{name}"
15
15
  summary "The simple way to create and monitor a Ruby daemon"
16
- version '0.1.3'
16
+ version '0.1.4'
17
17
  end
18
18
 
19
19
  rakefile do
data/templates/bash.erb CHANGED
@@ -22,7 +22,11 @@ case "<%= options[:action] %>" in
22
22
  rm -f $PID_FILE
23
23
  fi
24
24
  echo $$ > $PID_FILE;
25
- exec 2<&1 $COMMAND
25
+ <% if RUBY_PLATFORM.include?('darwin') %>
26
+ exec 2<&1 "$COMMAND"
27
+ <% else %>
28
+ exec 2<&1 su -c"$COMMAND"
29
+ <% end %>
26
30
  ;;
27
31
  stop)
28
32
  echo "Stopping <%= options[:name] %>"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: with_pid
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Winton Welsh
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-20 00:00:00 -07:00
18
+ date: 2010-11-01 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21