#!/usr/bin/perl # # Master Pre-Installation Tester # Version 1.0 # October 16, 2000 # Author: William Bontrager # Author's E-mail: william@willmaster.com # Author's Website: http://www.willmaster.com/ # # Master Pre-Installation Tester is designed to test your server in various # ways to assist you in determining directory paths and whether or not # specific Perl scripts will run on your server. # # It is designed to be executed with Perl 5+; it won't work with versions # prior to 5. It was developed and tested on a Unix server. # # COPYRIGHT NOTICE # Copyright 1998-2000 by William Bontrager. All rights reserved. # # Before installing and/or using Master Pre-Installation Tester, # you must agree to the complete license agreement # linked from http://willmaster.com/master # #=============================== # # I N S T R U C T I O N S # # All modifications must be made with an ASCII/plain text word processor (NotePad # and BBEdit are good). Also, when you upload the script, it must be uploaded as # ASCII/plain text. # # The file name of Master Pre-Installation Tester must have the extension your # server requires for Perl CGI scripts. Usually, that will be .cgi but sometimes # .pl is required. If in doubt, try MasterPreInstallationTester.cgi first. # # Step-by-step installation instructions: # # (1) Ensure the first line of this file points toward your Perl 5+ program. # Leave the "#!" at the beginning of the line. # # (2) Upload MasterPreInstallationTester.cgi into a directory allowed to run CGI programs. # # (3) Set file execution permission to MasterPreInstallationTester.cgi. # # If you're setting execution permission with your FTP program, the settings # are: # # owner -- read/write/execute # group -- read/execute # world -- read/execute # (some FTP programs use "other" instead of "world") # # If you're setting execution permission with Telnet, type: # # chmod 0755 MasterPreInstallationTester.cgi # # To use Master Pre-Installation Tester just type its URL into your browser. # Example: http://www.yourdomain.com/cgi-bin/MasterPreInstallationTester.cgi # #=============================== # # No other customization needed. # #=============================== require 5; $ME = $0; $ME =~ s/.*\/(.*?)/$1/; %R = (nflag => '', yflag => ' CHECKED'); @SNDtry = qw( /usr/sbin/sendmail /sbin/sendmail /usr/bin/sendmail /bin/sendmail /usr/lib/sendmail /lib/sendmail /usr/slib/sendmail /slib/sendmail /usr/sendmail /sendmail sendmail ); sub Exit { goto THE_END; } sub ValidEmail { return 0 if $_[0] =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; return 0 if $_[0] !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; return 1; } # sub ValidEmail sub PrintSpace { print '
'; } sub PageTop { print "Content-type: text/html\n\n"; print <|
Master Pre-Installation Tester Copyright 2000 William Bontrager. |