Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 6bc3a2bf9011961187c546f1a0991328 > scriptlet

htdig-web-3.2.0-1.12mdv2008.1.x86_64.rpm

POSTIN

/bin/sh
# Only run this if installing for the first time
if [ "$1" = 1 ]; then
	if [ -f /etc/httpd/conf/httpd.conf ];then
	SERVERNAME="`grep '^ServerName' /etc/httpd/conf/httpd.conf | awk 'NR == 1 {print $2}'`"
	fi
	[ -z "$SERVERNAME" ] && SERVERNAME="`hostname -f`"
	[ -z "$SERVERNAME" ] && SERVERNAME="localhost"
	sed 's/^start_url:.*/#&\
# (See end of file for this parameter.)/' /etc/htdig/htdig.conf > /tmp/ht.$$
	cat /tmp/ht.$$ > /etc/htdig/htdig.conf
	rm /tmp/ht.$$
	cat >> /etc/htdig/htdig.conf <<!

# Automatically set up by htdig RPM, from your current Apache httpd.conf...
# Verify and configure these, and set maintainer above, before running
# /usr/bin/rundig.
# See /usr/doc/htdig*/attrs.html for descriptions of attributes.

# The URL(s) where htdig will start.  See also limit_urls_to above.
start_url:	http://$SERVERNAME/

# This makes sure that we don't spider the web
local_urls_only: true

# These attributes allow indexing server via local filesystem rather than HTTP.
local_urls:	http://$SERVERNAME/=/var/www/html/
local_user_urls:	http://$SERVERNAME/=/home/,/public_html/
!

fi