#!/bin/bash # # xfeast: execute silc gateway # pid="$HOME/tmp/silc.pid" if [[ -f "$pid" ]]; then if `ps $pid | grep -q $pid`; then kill `cat $pid` fi rm $pid fi netcat -l -p 1706 -e "/usr/bin/feast .feast.conf" & echo "$!" > $pid trap "kill `cat $pid`" 2 15