While migrating old OH2 DSL-rules to OH3 I encountered the following:
exec.whitelist:
python /etc/openhab/scripts/webcamS.py
script:
...
var String cmd = "python /etc/openhab/scripts/webcamS.py"
var String bilderjson = executeCommandLine(Duration.ofSeconds(120), cmd, wetterpic, tempout, tempin, pressure, "0")
...
The logs say:
2021-05-25 18:09:45.808 [DEBUG] [c.internal.ExecWhitelistWatchService] - Updated command whitelist: [python /etc/openhab/scripts/webcamS.py, speedtest -f json]
2021-05-25 18:09:51.400 [WARN ] [rg.openhab.core.io.net.exec.ExecUtil] - Failed to execute commandLine '[python /etc/openhab/scripts/webcamS.py, mostlysunny, 12.14, 12.36, 87.01, 0]'
What did I miss?
sudo -u openhab python /etc/openhab/scripts/webcamS.py
works.