From c50212eee92dcc250e7554f3608c151242c3b835 Mon Sep 17 00:00:00 2001 From: Bruno Bottazzini Date: Wed, 18 May 2016 18:16:49 -0300 Subject: [PATCH] routes: replace sh to bash /bin/sh in most systems will be a symbolic link to others shell. Usually this link points to /bin/bash and in some distro they point to another shell. For instance Ubuntu links sh to dash and so on. With this patch we avoid compability problems that we might have in distros that sh does not link to bash. Signed-off-by: Bruno Bottazzini --- server/routes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/routes.js b/server/routes.js index d658aef..4076408 100644 --- a/server/routes.js +++ b/server/routes.js @@ -222,7 +222,7 @@ } if (!err) { getConfigureFile(current_user(req), conf, function (error) { - child = exec("sh " + script); + child = exec("bash " + script); child.stdout.on('data', function(data) { stdout += data; console.log('stdout: ' + data); @@ -447,7 +447,7 @@ var child; var script = scripts_dir() + "/fbp-runner.sh"; script = script + ' stop ' + env_file(current_user(req)); - child = exec("sh " + script); + child = exec("bash " + script); child.on('close', function(code) { console.log('closing code: ' + code); res.sendStatus(code);