Kill a process (with PID) from Rules ... don't work

Hello, I created a bash files to kill a process with his PID. this bash file work in SSH

#!/bin/sh  
ps faux | grep tuya-mqtt.js | tr -s " " " " | cut -d " " -f 2 | xargs kill -9

The problem is , it don"t work from rules

rule "kill tuya-mqtt"
when
	Time cron "0 0 15 1/1 * ? *" or
	Time cron "0 0 3 1/1 * ? *"
then
	logInfo("Processus","Kill tuya-mqtt")
	executeCommandLine("/bin/bash /etc/openhab2/scripts/bash_scripts/kill_tuyamqtt.sh")
end

I show you autorisation :

[12:04:47] openhabian@openHABianPi : /etc/openhab2/scripts/bash_scripts$ ls -l
total 12
-rw-rw-r-- 1 openhab openhabian 89 Jul 26 21:37 kill_tuyamqtt.sh 

I don’t know where is the problem, thank you

Your script does not run as root so it isn’t allowed to kill that process.

that’s what I think :slight_smile: but what’s is the solution ?