@Alexaas maybe the first link allready helps you.
If it still does not get executed you can take the long way with a rule, similar setup as the second link.
The long way may also help you debugging by logging the returned massage from the command line.
Thanks. That worked. BUT it ended in an endless loop because everytime openhab started up the Thing was executed and the pi restarted or was shutdown I had to be fast to fix this…
I knew there was a reason I’m not very positive about OH shutting down the system it is running on.
There are some ways I think you can address this problem but it is going to require you to abandon theExec binding in favor of using executeCommandLine from a Rule.
Essentially you need to convert your Switch to a proxy and create a rule that only triggers when that Proxy Item receives a command ON.