3 MAILTO=+42$NUM@sms.paegas.cz
4 SAFE="tr -cd 'a-zA-Z0-9\040.:\042\043\044\055/<>(){}'"
10 From: Step-activator <short+fromstep@ucw.cz>
12 Content-Type: text/plain
13 Content-Transfer-Encoding: 7bit
18 head -n $hd $t|grep "^From:"
20 )|/usr/sbin/sendmail "$MAILTO"
26 echo "$1;true"|ssh -o "BatchMode yes" k332.feld.cvut.cz sh &>$t.e || \
27 sendmail "ssh execute fail:`cat $t.e|$SAFE`"
31 hd="$[`sed -n -e '/^\$/=' -e '/^\$/q' <$t`+1]"
32 id="`tail +$hd $t|head -n 1|$SAFE`"
33 [ "$id" != 0 -a "$id" != 1 ] && \
34 sendmail "Command syntax:ID=$id"
35 k332cmd "killall httpsd postmaster"
36 if [ "$id" = 1 ];then k332cmd ". .profile &>/dev/null;./step/pgsql/bin/postmaster.run&./step/httpsd";fi
37 sendmail "Ran, last res <`cat $t.e|$SAFE`>"