git.annexia.org
/
whenjobs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use $SHELL environment variable to run the shell scripts.
[whenjobs.git]
/
daemon
/
daemon.ml
diff --git
a/daemon/daemon.ml
b/daemon/daemon.ml
index
1155f50
..
6f5edfb
100644
(file)
--- a/
daemon/daemon.ml
+++ b/
daemon/daemon.ml
@@
-357,8
+357,10
@@
and run_job job =
close_out chan;
chmod script 0o700;
close_out chan;
chmod script 0o700;
+ let shell = try getenv "SHELL" with Not_found -> "/bin/sh" in
+
(* Execute the shell script. *)
(* Execute the shell script. *)
- (try execvp
"bash" [| "bash"
; "-c"; script |];
+ (try execvp
shell [| shell
; "-c"; script |];
with Unix_error (err, fn, _) ->
Syslog.error "%s failed: %s: %s" fn script (error_message err)
);
with Unix_error (err, fn, _) ->
Syslog.error "%s failed: %s: %s" fn script (error_message err)
);