#!/bin/sh ######################### # December 2002 by Vincent Li# ######################### PATH=$PATH:/usr/local/bin:/sbin export PATH oldip=`grep "address=" /etc/dns2go.conf | sed -e 's/.*=//'` newip=`/sbin/ifconfig | grep 'P-t-P' | sed -e 's/.*addr://' -e 's/ P-t-P.*//'` pid=`ps -ef | grep dns2go | grep -v grep | awk '{print $2;}'` if [ "$oldip" = "$newip" -a -n "$pid" ] ; then exit else cp /etc/dns2go.conf /etc/dns2go.conf.tmp sed -e "s/$oldip/$newip/" /etc/dns2go.conf.tmp > /etc/dns2go.conf kill $pid dns2go & fi