3 # make this the default shell for user tuerctl and add
4 # the following line to sudoers file:
6 # tuerctl ALL=(tuer) NOPASSWD: /flash/tuer/tuer_socat.sh
8 setopt histsubstpattern
9 #local TUERCHAN="sudo -u tuer /flash/tuer/tuer_socat.sh"
10 local TUERCHAN="sudo -u tuer /flash/tuer/door_client_zmq"
12 [[ $1 == "-c" ]] && shift
16 if [[ -z $SSH_ORIGINAL_COMMAND ]]; then
17 echo "Usable commands are: open, close, toggle status"
20 CMD=("${=SSH_ORIGINAL_COMMAND}")
22 if [[ $CMD == "status" ]]; then
28 ${(z)TUERCHAN} <<< "${${CMD[1]}:gs/[^a-zA-Z]//}${EXT}"
29 [[ $CMD == status ]] && sleep 1