Command script not working - Raspberry?
-
Hi, not sure what i am doing wrong. I have created a script called test.sh which has the following content:
#!/bin/bash
a="hello world"
echo $a >> test.txtit writes a text to another file called test.txt. the script works when I am running it from the command line.
However, when I run it via triggercmd it's not doing anything. Log shows this:
Running trigger: Hello World Command: sudo /home/pi/tmp/test.sh
Reported: Command RanBut the command fails to do what it should do.
This is what i listed in the commands.json file:
{"trigger":"Hello World","command":"sudo /home/pi/tmp/test.sh","ground":"foreground","voice":"update","allowParams": "false"}
I also tried without sudo, but no lock.
Any idea what I am doing wrong?
-
@Joost-Breggeman said in Command script not working - Raspberry?:
{"trigger":"Hello World","command":"sudo /home/pi/tmp/test.sh","ground":"foreground","voice":"update","allowParams": "false"}
nevermind... found it. there should be an absolute path to the text file in the script