Running a python script when Channel triggered

Basically first get the script to execute in command line without sudo, find out which permissions you need and add openhab to the specific group. Or enable sudo for this one command, which would be the last solution.

Additional add the shebang to your script and use it like this.

sudo u- openhab  /etc/openhab2/scripts/pumpenreset.py