--- frontpage/version5.0/fp_install.sh.orig Mon Apr 16 07:39:25 2001 +++ frontpage/version5.0/fp_install.sh Sat Jun 7 21:00:21 2003 @@ -12,7 +12,7 @@ main() { initialize step1 # setup environment - step2 # untar +# step2 # untar $FPDIR/set_default_perms.sh # Run the external permissions script. step3 # upgrade/install @@ -52,12 +52,13 @@ echo migrateoldconfig || error # Migrate old frontpage.cnf (if any) - change_server || error # upgrade httpd +# change_server || error # upgrade httpd upgradeexistingservers || error # Check to see if servers need upgrading upgrade="yes" chownexistingservers || error # Now chown the webs handlelanguage || error # configure some global settings installrootweb || error # Install the root web + installadminweb || error # Install the FrontPage Server Administration Web installnewsubwebs $PORT || error # Install new servers installvirtualwebs || error # Install any virtual webs } @@ -132,9 +133,11 @@ { VERSION="5.0" PATH=".:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/etc:/usr/bsd" + AP_TARGET=`PREFIX/sbin/apxs -q TARGET` + AP_CONFDIR=`PREFIX/sbin/apxs -q SYSCONFDIR` INSTALLDIRDEFAULT="/usr/local/frontpage" NEWHTTPDNEW="/usr/local/frontpage/version${VERSION}/apache-fp/httpd" - DEFAULTHTTPD="/usr/local/apache/sbin/httpd" + DEFAULTHTTPD="PREFIX/sbin/httpd" FPDIR="/usr/local/frontpage/version${VERSION}" case "`echo 'x\c'`" in @@ -390,29 +393,9 @@ { retval=0 - cat <" + echo + echo "The FrontPage Server Administration setup will require the following change" + echo "in ${AP_CONFDIR}/${AP_TARGET}.conf for :" + echo + echo " AllowOverride AuthConfig Limit Indexes Options" + echo + echo "otherwise, the FrontPage Server Administration web will not allow you to login." + echo + echo "This will then make FrontPage Server Administration available at:" + echo + echo " http://`hostname`:10865/fpadmcgi.exe" + echo + return $retval + fi + + echo " " + echo "Installing FrontPage Server Administration..." + echo " " + + defconfigfile="${AP_CONFDIR}/${AP_TARGET}.conf" + + while ( [ "$configfile" = "" ] || [ ! -f $configfile ] ) + do + $echo "Server config filename: [$defconfigfile] ${nnl}" + read configfile + if [ "$configfile" = "" ] + then + configfile=$defconfigfile + fi + done + httpdconfigfile=$configfile + + defadmin="fpadmin" + until [ "$admin" != "" ] + do + $echo "FrontPage Server Administration user name: [$defadmin] ${nnl}" + read admin + if [ "$admin" = "" ] + then + admin=$defadmin + fi + done + +# Need to determine if the FrontPage Server Administration Web was previously +# installed and to which port it was installed on. + +# getHttpRootDirective $configfile Port +# port=$param + + defport="10865" + until [ "$port" != "" ] + do + $echo "Enter the FrontPage Server Administration port number: [$defport] ${nnl}" + read port + if [ "$port" = "" ] + then + port=$defport + fi + done + +# getHttpRootDirective $configfile DocumentRoot +# docroot=$param +# if [ ! -d "$docroot" ] +# then +# echo "ERROR: $docroot does not exist!" +# return 1 +# fi + + echo "Installing FrontPage Server Administration on port $port..." + echo + ${FPDIR}/bin/owsadm.exe -o setadminport -p $port -s $configfile -u $admin || + { + echo "ERROR: FrontPage Server Administration installation failed." + $echo "Hit enter to continue${nnl}" + read continue + return 1 + } + echo + echo "FrontPage Server Administration is now available at:" + echo + echo " http://`hostname`:${port}/fpadmcgi.exe" + echo + echo "The FrontPage Server Administration setup requires the following change" + echo "in ${AP_CONFDIR}/${AP_TARGET}.conf for :" + echo + echo " AllowOverride AuthConfig Limit Indexes Options" + echo + echo "otherwise, the FrontPage Server Administration web will not allow you to login." + echo + + return $retval +} + # Install a web on a multihosted server installvirtualwebs() { @@ -1464,7 +1580,7 @@ return $retval fi - defaultconfigfile=$configfile + defaultconfigfile="${AP_CONFDIR}/${AP_TARGET}.conf" configfile="" while ( [ "$configfile" = "" ] || [ ! -f $configfile ] ) do @@ -1922,10 +2038,16 @@ resconffile="${configfiledir}${file}" ;; esac + if [ ! -f $resconffile ] + then + echo "ERROR: $resconffile does not exist! Using $configfile instead." + resconffile=$configfile + fi else resconffile="${configfiledir}srm.conf" if [ ! -f $resconffile ] then + echo "ERROR: No ResourceConfig directive found, add 'ResourceConfig /dev/null' to $configfile" resconffile=$configfile fi fi @@ -1999,7 +2121,7 @@ param=`cat $configfile | $awk " /^[^#]* *< *${virtualhost}/,/^[^#]* *< *\/${virtualhost}/ { next } - /^[^#]* *${mc_string}[ $TAB]/ { print \\\$2 }"` + /^[^#]* *${mc_string}[ $TAB]/ { print \\\$2 }" | sed -e 's/"//g'` return 0 } @@ -2050,7 +2172,7 @@ print ARRAY[i] } } - } "` + } " | sed -e 's/"//g'` if [ "$param" = "" ] then