eval 'exec perl -S $0 ${1+"$@"}'
    if "";
##########################################################################
# Configuration program for phttpd. After making changes here shutdown and
# restart the server for the changes to take effect.
##########################################################################

require 'setup.pl';

if (-r 'config.ph') {
    require 'config.ph';
} else {
    $http_data = `pwd`;
    chop $http_data;
    $NETSCAPE = "netscape";
}

# specify the complete directory to where all the basic web data are
# stored. This is equivalent to the SERVER_ROOT directory.
print "\nLocation of Merlin (".$http_data."): ";

if (($foo = <>) ne "\n") {
    chop $foo;
    $http_data = $foo;
}

# Specify the location of Netscape (Netscape 1.1 or greater is
# required).
print "\n\nLocation of Netscape 1.1 (".$NETSCAPE."): ";
if (($foo = <>) ne "\n") {
    chop $foo;
    $NETSCAPE = $foo;
}

open(CONFIG, "> config.ph");


print CONFIG <<EOF

# Don't edit this file!
# It was automatically generated by config.
# specify the complete directory to where all the basic web data are
# stored. This is equivalent to the SERVER_ROOT directory.
\$http_data = "$http_data";

# Specify the location of Netscape (Netscape 1.1 or greater is
# required).
\$NETSCAPE = "$NETSCAPE";

EOF
;
