I need to execute some shell scripts along my project:
restoreBackup(timestamp) {
return runCommand(`backup_restore.sh ${timestamp}`);
},
The timestamp has to be passed to the script in the form of a unix timestamp. e.g. 1513252423 The Timestamp is set or passed:
restoreBackup(timestamp,callback) {
backup.restoreBackup(timestamp)
.then(callback)
.catch(err => callback(err));
}
Problem is that my current solution doesn't work, it is kind of derived from the call I use directly on bash. The timestamp is not passed as unix time, but converted to a string, this is the output in the node console:
Running cmd: /home/essentim/manager/scripts/backup_restore.sh Thu Dec 14 2017 11:53:43 GMT+0000 (UTC)
error handler:
"/bin/sh: 1: Syntax error: \"(\" unexpected"
Any Idea how to solve this in this case?