Commit 5ac3c8e2c24780f9e25077daf5272acf47bf6422

Authored by Adhidarma Hadiwinoto
1 parent b79c10f5a1
Exists in master

Ready to test restart smstools service

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

lib/apiserver/routers/smstools.js
... ... @@ -20,7 +20,8 @@ async function pageStatusRaw(req, res) {
20 20 }
21 21  
22 22 function pageRestart(req, res) {
23   - childProcess.exec('groups', (err, stdout, stderr) => {
  23 + const fileToExec = config.restart_smstools_wrapper || '/var/lib/smstools/centers/smstools/bin/restart-smstools';
  24 + childProcess.execFile(fileToExec, (err, stdout, stderr) => {
24 25 res.json({
25 26 err,
26 27 stdout,