I've got a problem to run my script.
I want to remote control my FHEM with netcat.
If I run my script in the CLI everything works fine. If I remap my red key to the path of the script, the echo command works but the netcat won't.
Any ideas?
Here my script:
Code: Select all
#!/bin/sh
[ $(pidof ${0##*/}) ] 2>/dev/null || exit 0
echo "set WZ_Lampe_vorne toggle" >> /dtv/echo.log
sleep 1
echo "set WZ_Lampe_vorne toggle" | netcat 192.168.178.37 7072
sleep 2