#!/bin/sh # append remote commands to the cmd file for guardian2, # and return list of blocked hosts # #set -x # PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH file=/etc/guardian/guardian.cmd if test -n "$file" -a -w "$file" -a -n "$1"; then echo $@ >>$file else for (( i=0;$i<5;i=$i+1 )); do if test ! -f /tmp/guardian.lck -a -s /tmp/guardian.out; then cat /tmp/guardian.out; break; fi sleep 1; done fi