#!/bin/sh # 2007-06-07 Kai Ove Gran # # This script will configure and launch micro_proxy on floppyfw # (http://www.zelow.no/floppyfw/. Keep in mind that you floppyfw will have to # be compiled with support for inetd for this to work. # You will also have to open tcp port 8080 from the internal net (Should be # allowed by default). # # You can read more about micro_proxy at # http://www.acme.com/software/micro_proxy/ if [ -f /sbin/inetd ]; then if grep "^webcache" /etc/inetd.conf >/dev/null 2>&1; then echo "micro_proxy can not start as the webcache port is already in use" exit 1 else echo "webcache stream tcp nowait root /usr/bin/micro_proxy" >> /etc/inetd.conf fi PID=$(ps | grep -v grep | grep inetd | sed 's/^ \{1,\}//' | cut -d\ -f1) if [ ! -z "$PID" ]; then echo "inetd already running.. restarting.." kill -HUP $PID else echo "Starting inetd." inetd /etc/inetd.conf fi else echo "inetd not found, not installing Microproxy" fi