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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login