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)
);
The user's home directory. This directory must exist and must be
owned by the same user as the daemon.
+=item C<$SHELL>
+
+The shell used to execute shell scripts. If not set, C</bin/sh> is
+used.
+
=back
=head1 SEE ALSO