2.5.2
Yes. The whitelist is about binding Things.
Cool, the âexec:command:â lines I had in Things are now in cron jobs.
Came here after I was experiencing issues. My issue was the fact that I had created the file and put it in the correct location but openhab did not own the file.
In case anyone else finds this useful. Using terminal/putty the method I ended up with that works was as follows:
#create directory
sudo mkdir /etc/openhab2/misc/
#create the file and add my commands (1 per line)
echo "/usr/bin/sudo /sbin/shutdown -h now
/usr/bin/sudo /sbin/reboot" | sudo tee /etc/openhab2/misc/exec.whitelist
#make openhab the owner of the directory and files within
sudo chown -hR openhab:openhab /etc/openhab2/misc/
Hi all,
Iâm running OpenHAB 2 on CentOS 7. I updated OpenHAB to version 2.5.2 yesterday and ran into the same problem.
As stated above, I had to create both the directory /etc/openhab2/misc and the file exec.whitelist wiht my commands.
At first it did not work, but I read about the line endings in this thread. I had to convert the file to DOS format to be able to use it.
You can use the tool âunix2dosâ from the dos2unix package to do that.
unix2dos /etc/openhab2/misc/exec.whitelist
Hope this helps someone.
My question is: does anybody know how to use wildcards in this file? I run a script with multiple IP addresses as parameter, currently I had to add a line for every IP address, like this
/path/script 1.1.1.1
/path/script 2.2.2.2
This does not work:
/path/script *
Also not working with a regex:
/path/script.*
Anybody?
Regards,
Christian
I donât see that anyone else has contributed one, I wrote a one-line perl command to generate the exec.whitelist file from things/*.things . I have this script in my misc directory (both my dev and server are linux):
perl -ne 'print "$1\n" if /command=\"([^"]+)\"/' ../things/*.things >exec.whitelist
This is inteded to be run from /etc/openhab2/misc itself. I put it in a shell script so I can run it easily after making modifications. In that case, I copied the file that came with the distribution (that had the commend headers) and I run the attached.
do.sh.txt (272 Bytes)
Im not bright enough either - can someone point me to a reference on how to get a jar file from jfrog?
I think you can get the jar file for all of the 2.5.1 addons here.
You should be able to extract the exec binding jar from that.
Thanks - got it and back up and running with 2.5.1 version