Hello.
I have a problem with a network share an the node-red integration, particularly the exec command.
The command is a very simple copy one:
cp /config/www/cam_captures/ojo_interior.jpg /config/samba/camera/1613148935618.jpg
That is the string that I generate and I pass down to the exec command. If I copy paste that command on the shell it works perfectly, but If I execute the flow it does nothing. No error, the output status is 0, but the file is not copied.
What can be going on here?
The flow is simple as hell:
[
{
"id": "a03ab777.710698",
"type": "debug",
"z": "f92c309a.afade",
"name": "hook",
"active": false,
"tosidebar": true,
"console": true,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 930,
"y": 620,
"wires": []
},
{
"id": "271f9e23.20b8d2",
"type": "exec",
"z": "f92c309a.afade",
"command": "",
"addpay": true,
"append": "",
"useSpawn": "false",
"timer": "",
"oldrc": false,
"name": "",
"x": 710,
"y": 720,
"wires": [
[],
[],
[]
]
},
{
"id": "9eeb7fdc.b058e",
"type": "function",
"z": "f92c309a.afade",
"name": "build cmd",
"func": "const file = msg.file\nconst share = '/config/samba/camera'\nconst d = new Date()\nmsg.payload = `cp ${file} ${share}/${Date.now()}.jpg`\nreturn msg",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 720,
"y": 680,
"wires": [
[
"271f9e23.20b8d2",
"efc2f381.93dd3"
]
]
},
{
"id": "efc2f381.93dd3",
"type": "debug",
"z": "f92c309a.afade",
"name": "exec",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 960,
"y": 720,
"wires": []
}
]