X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=daemon%2Fdaemon.ml;h=6f5edfbaf34367d40f3d4d57e7c1184e86f2fa3a;hb=e74ab6c5b107e3daeb4fae3f59013856be060bad;hp=1155f500d2b2bfd270109d2de92cb3eaccb568a9;hpb=2701d3a832514ee94d110dfbd4f46f2ab6d9637e;p=whenjobs.git diff --git a/daemon/daemon.ml b/daemon/daemon.ml index 1155f50..6f5edfb 100644 --- a/daemon/daemon.ml +++ b/daemon/daemon.ml @@ -357,8 +357,10 @@ and run_job job = close_out chan; chmod script 0o700; + let shell = try getenv "SHELL" with Not_found -> "/bin/sh" in + (* 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) );