NDR008
(Nadir Syed)
December 29, 2017, 8:08pm
1
So, I have a command:
executeCommandLine("/etc/openhab2/scripts/rungnuplot.sh")
Can anyone see anything wrong with that?
The script itself only has:
#!/bin/sh
gnuplot /var/log/openhab2/gnuplot.script
Could someone help me understand why it is not executing the script?
Thanks.
markrad
(Mark Radbourne)
December 29, 2017, 8:31pm
2
Is the script executable? If you use ls -al you should see the x in the attributes. For example:
-rwxrwxr-x 1 markrad markrad 1545 Oct 11 13:08 blob.sh*
The xs in my example show it is executable by the owner, members of the group and everybody else. Use
sudo chmod +x /etc/openhab2/scripts/rungnuplot.sh
to fix it if it’s not.
NDR008
(Nadir Syed)
December 29, 2017, 8:36pm
3
yup, already had given it executable rights.
-rwxrwxr-x 1 openhabian openhabian 56 Dec 29 20:49 rungnuplot.sh
What’s strange is…
//executeCommandLine("/etc/openhab2/scripts/rungnuplot.sh")
executeCommandLine("gnuplot /var/log/openhab2/gnuplot.script")
Changing from the sh to a direct execution seemed to achieve my final goal so… not sure why I couldn’t run the script, so I guess I delayed that issue for another day.