home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #
- # This script will install proper files for using
- # sendmail with PPP. Please read the README.rtfd file
- # before continuing. You must modify the files before you
- # run this script.
-
- #
- # Make sure we have suitable permission
- #
-
- if [ ! "`whoami`" = "root" ]; then
- echo
- echo Yo... this script must be run as root!!!
- echo
- exit;
- fi
-
-
-
- #
- # Verify basics
- #
-
- if [ ! -d /etc/sendmail ]; then
- echo
- echo Their appears to be something wrong with your configuration.
- echo You do not have an /etc/sendmail directory
- echo
- exit;
- fi
-
- #
- if [ -r /etc/sendmail/userdb ]; then
- echo
- echo Backing up existing /etc/sendmail/userdb to /etc/sendmail/userdb.prePPP
- echo
- mv /etc/sendmail/userdb /etc/sendmail/userdb.prePPP
- fi
-
- echo Installing userdb in /etc/sendmail/userdb
- cp userdb /etc/sendmail
-
- #
- echo Making user database...
- /usr/local/bin/makemap btree /etc/sendmail/userdb.db < /etc/sendmail/userdb
- echo user database successfully created
-
- #
- if [ -r /etc/sendmail/cf/cf/next.mc ]; then
- echo
- echo Backing up existing /etc/sendmail/cf/cf/next.mc to /etc/sendmail/cf/cf/next.mc.prePPP
- echo
- mv /etc/sendmail/cf/cf/next.mc /etc/sendmail/cf/cf/next.mc.prePPP
- fi
-
- echo Installing next.mc in /etc/sendmail/cf/cf/next.mc
- cp next.mc /etc/sendmail/cf/cf/next.mc
-
- #
- if [ -r /etc/sendmail/cf/domain/mydomain.m4 ]; then
- echo
- echo Backing up existing /etc/sendmail/cf/domain/mydomain.m4 to /etc/sendmail/cf/domain/mydomain.m4.prePPP
- echo
- mv /etc/sendmail/cf/domain/mydomain.m4 /etc/sendmail/cf/domain/mydomain.m4.prePPP
- fi
-
- echo Installing mydomain.m4 in /etc/sendmail/cf/domain/mydomain.m4
- cp mydomain.m4 /etc/sendmail/cf/domain/mydomain.m4
-
- if [ -r /etc/sendmail.cw ]; then
- echo
- echo Backing up existing /etc/sendmail.cw to /etc/sendmail.cw.prePPP
- echo
- mv /etc/sendmail.cw /etc/sendmail.cw.prePPP
- fi
-
-
- echo Installing sendmail.cw in /etc/sendmail.cw
- cp sendmail.cw /etc/sendmail.cw
-
- #
- if [ -r /etc/sendmail.cf ]; then
- echo
- echo Backing up existing /etc/sendmail.cf to /etc/sendmail.cf.prePPP
- echo
- cp /etc/sendmail.cf /etc/sendmail.cf.prePPP
- fi
-
- cd /etc/sendmail/cf/cf
- /usr/local/bin/m4 ../m4/cf.m4 next.mc > /etc/sendmail.cf
-
- echo Installation finished.
-
-
-