aboutsummaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-06-03 18:01:11 +0100
committerLouise Crow <louise.crow@gmail.com>2013-06-03 18:01:11 +0100
commitaf003d8cd5909e1c7e1827d70f9ed7dd9586d738 (patch)
treeac56038a4361b812850865f4f11e7020f280462d /script
parente30a8623a1706d3bad4476198085547d8f47cc88 (diff)
parent9a4b220be62dcaceee45c70316c1a58a92abcfc5 (diff)
Merge branch 'hotfix/0.11.0.1' into release/0.110.11.0.1
Diffstat (limited to 'script')
-rwxr-xr-xscript/runner5
1 files changed, 3 insertions, 2 deletions
diff --git a/script/runner b/script/runner
index 73b03847d..32a0e6b7e 100755
--- a/script/runner
+++ b/script/runner
@@ -19,12 +19,13 @@ Dir.chdir(alaveteli_dir) do
# Load the runner in a subprocess
pid = fork do
- `bundle exec rails runner #{ARGV[1]}`
+ exec("bundle exec rails runner #{ARGV[1]}")
exit 0
end
# If the environment variable PIDFILE is present,
# write the pid of the daemon process to that file.
+
if ENV.has_key? "PIDFILE"
File.open(ENV["PIDFILE"], 'w') do |fh|
fh.puts pid
@@ -34,6 +35,6 @@ Dir.chdir(alaveteli_dir) do
Process.detach(pid)
else
# Not daemon mode
- `bundle exec rails runner #{ARGV[1]}`
+ exec("bundle exec rails runner #{ARGV[1]}")
end
end