Sophie

Sophie

distrib > PLD > ac > amd64 > by-pkgid > cf1da56868a6a71fbcf573cd5d703bfe > scriptlet

htdig-3.2.0b4-0.20030413.1.amd64.rpm

POSTIN

/bin/sh
# Only run this if installing for the first time
if [ "$1" = 1 ]; then
  if [ -f /etc/httpd/httpd.conf ]; then
	umask 027
	for i in `grep '^ServerName' /etc/httpd/httpd.conf | sort -u | awk '{print $2}'`; do
		echo -n "http://$i/ "
	done > /etc/httpd/httpd.conf.htdig.tmp
	SERVERNAMES="`cat /etc/httpd/httpd.conf.htdig.tmp`"
	rm -f /etc/httpd/httpd.conf.htdig.tmp
	[ -z "$SERVERNAMES" ] && SERVERNAMES="`hostname -f`"
	[ -z "$SERVERNAMES" ] && SERVERNAMES="localhost"
	SERVERNAME=`grep '^ServerName' /etc/httpd/httpd.conf | uniq -d | awk '{print $2}'`
	grep -v -e local_urls -e local_user_urls -e start_url /etc/htdig/htdig.conf > /etc/htdig/htdig.conf.tmp
	mv -f /etc/htdig/htdig.conf.tmp /etc/htdig/htdig.conf
	echo "start_url:$SERVERNAMES
local_urls:		$SERVERNAMES
local_user_urls:	http://$SERVERNAME/=/home/,/public_html/" >> /etc/htdig/htdig.conf
  fi
fi