X-Git-Url: https://git.realraum.at/?p=svn42.git;a=blobdiff_plain;f=tuerctlsh;fp=tuerctlsh;h=0000000000000000000000000000000000000000;hp=de9adc6843f88146ced261d78d57073bad315658;hb=c775b5528f8f96e75c28264b9cea8525c6da9298;hpb=a87c91b7d4544703879b7ef6e472b863765e3949 diff --git a/tuerctlsh b/tuerctlsh deleted file mode 100755 index de9adc6..0000000 --- a/tuerctlsh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/zsh -# -# make this the default shell for user tuerctl and add -# the following line to sudoers file: -# -# tuerctl ALL=(tuer) NOPASSWD: /flash/tuer/tuer_socat.sh - -setopt histsubstpattern -#local TUERCHAN="sudo -u tuer /flash/tuer/tuer_socat.sh" -local TUERCHAN="sudo -u tuer /flash/tuer/door_client_zmq" - -[[ $1 == "-c" ]] && shift -if [[ -z $1 ]]; then - ${(z)TUERCHAN} -else - if [[ -z $SSH_ORIGINAL_COMMAND ]]; then - echo "Usable commands are: open, close, toggle status" - read -A CMD - else - CMD=("${=SSH_ORIGINAL_COMMAND}") - fi - if [[ $CMD == "status" ]]; then - local EXT="" - else - local EXT=" ssh $1" - fi - - ${(z)TUERCHAN} <<< "${${CMD[1]}:gs/[^a-zA-Z]//}${EXT}" - [[ $CMD == status ]] && sleep 1 -fi -