Exec binding how to kill a process

Hello,

I am trying to kill a certain process with the exec binding.

Here is my code:

The ON command works.

Switch	PixelController_Power "Start" {exec=">[ON: sudo /home/pi/pixelcontroller/console/PixelControllerRPi.sh] >[OFF: sudo pkill -f 'java.*PixelController']"}

I have added the openhab user to the sudo group without any password but nothing happens when executing this command.

Any tips what to do?