This file is indexed.

config is in webalizer 2.23.08-1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#! /bin/sh
# config script for webalizer
#
# see: dh_installdeb(1)

set -e

# bogus - though necessary - rule
. /usr/share/debconf/confmodule
db_version 2.0

case "$1" in
    configure|reconfigure)
      if [ "$2" ] && dpkg --compare-versions $2 lt 2.01.6-1; then
        db_input high webalizer/upgrading || true
        db_go
      fi
      
      if [ "$2" ] && dpkg --compare-versions $2 lt 2.01.10-30; then
        db_input high webalizer/upgrade2011030 || true
        db_go
      fi

      if [ -f "/etc/webalizer.conf" ] && [ ! -f "/etc/webalizer/webalizer.conf" ]; then
        [ -d /etc/webalizer/ ] || mkdir /etc/webalizer/;
        mv /etc/webalizer.conf /etc/webalizer/webalizer.conf;
      fi

      conffile="/etc/webalizer/webalizer.conf"
      OUTPUTDIR=""
      REPORTTITLE=""
      LOGFILE=""
      if [ -f $conffile ]; then
	# parse existing configuration.  This code happily
	# concatenates multiple occurences of a configuration item,
	# but that should never occur <frank@debian.org>.
	OUTPUTDIR=`sed -ne '/^OutputDir/ {s@OutputDir[[:space:]]\([^[:space:]]*\)@\1@;p}' $conffile`
	REPORTTITLE=`sed -ne '/^ReportTitle/ {s@ReportTitle[[:space:]]\([^[:space:]]*\)@\1@;p}' $conffile`
	LOGFILE=`sed -ne '/^LogFile/ {s@LogFile[[:space:]]\([^[:space:]]*\)@\1@;p}' $conffile`
      fi
      # assign default values
      [ -n "$OUTPUTDIR" ] || OUTPUTDIR="/var/www/webalizer"
      [ -n "$REPORTTITLE" ] || REPORTTITLE="Usage statistics for"
      if [ -z "$LOGFILE" ]; then
        # apache2 found?
	if [ -f /var/log/apache2/access.log.1 ] || [ -f /var/log/apache2/access.log ]; then
          LOGFILE="/var/log/apache2/access.log.1";
	else
          LOGFILE="/var/log/apache/access.log.1";
	fi
      fi

      # now preseed the debconf questions with what we found
      db_set webalizer/directory "$OUTPUTDIR" || true
      db_set webalizer/doc_title "$REPORTTITLE" || true
      db_set webalizer/logfile "$LOGFILE" || true

      # Ask for the directory the output should be put in
      db_input medium webalizer/directory || true
      db_go

      # At this point, ask the user what the title of webalizer's reports should be
      db_input medium webalizer/doc_title || true
      db_go

      # Ask for the rotated logfile
      # by default  is access log file of apache, but if I found apache2 log file,
      # I changed default to this one.
      db_input medium webalizer/logfile || true
      db_go

      # Ask for enable DNSCache option
      db_input medium webalizer/dnscache || true
      db_go
    ;;
    *)
        echo "config called with unknown argument \`$1'" >&2;
        exit 1;
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

exit 0