code: function executeCmd(cmd, debug, quitapp) {
      if (typeof cmd !== 'object') {
          throw new Error('Empty or invalid argument list!');
      }
  
      let finalcmd = cmd.join(' ');
  
      if (debug) {
          // debug mode, print to console
          console.log(`Debug shutdown command: ${finalcmd}`)
          if (quitapp) {
              console.log("Now exit app...");
              app.exit(0);
          }
      } else {
          cp.exec(finalcmd, (err, stdout, stderr) => {
              if (err) {
                  console.error(err);
                  return;
              }
              //console.log(stdout);
              if (quitapp) {
                  app.exit(0);
              }
          });
      }
  }
docs: Execute command
  @param {Object} cmd array of commands
  @param {Boolean} debug show console results, not execute the command
  @param {Boolean} quitapp quit app after send the command