home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Mail / sendmail-8.8.5-MIHS / InstallTips / inst_sendmail next >
Encoding:
Text File  |  1996-06-14  |  2.1 KB  |  96 lines

  1. #!/bin/sh
  2. #
  3. # This script will install proper files for using
  4. # sendmail with PPP.  Please read the README.rtfd file
  5. # before continuing.  You must modify the files before you
  6. # run this script.
  7.  
  8. #
  9. # Make sure we have suitable permission
  10. #
  11.  
  12. if [ ! "`whoami`" = "root" ]; then
  13.     echo 
  14.     echo Yo... this script must be run as root!!!
  15.     echo 
  16.     exit;
  17. fi
  18.  
  19.  
  20.  
  21. #
  22. # Verify basics
  23. #
  24.  
  25. if [ ! -d /etc/sendmail ]; then
  26.   echo
  27.   echo  Their appears to be something wrong with your configuration.
  28.   echo  You do not have an /etc/sendmail directory
  29.   echo
  30.   exit;
  31. fi
  32.  
  33. #
  34. if [ -r /etc/sendmail/userdb ]; then
  35.   echo
  36.   echo Backing up existing /etc/sendmail/userdb to /etc/sendmail/userdb.prePPP
  37.   echo
  38.   mv /etc/sendmail/userdb /etc/sendmail/userdb.prePPP
  39. fi
  40.  
  41. echo Installing userdb in /etc/sendmail/userdb
  42. cp userdb /etc/sendmail
  43.  
  44. #
  45. echo Making user database...
  46. /usr/local/bin/makemap btree /etc/sendmail/userdb.db < /etc/sendmail/userdb
  47. echo user database successfully created
  48.  
  49. #
  50. if [ -r /etc/sendmail/cf/cf/next.mc ]; then
  51.   echo
  52.   echo Backing up existing /etc/sendmail/cf/cf/next.mc to /etc/sendmail/cf/cf/next.mc.prePPP
  53.   echo
  54.   mv /etc/sendmail/cf/cf/next.mc /etc/sendmail/cf/cf/next.mc.prePPP
  55. fi
  56.  
  57. echo Installing next.mc in /etc/sendmail/cf/cf/next.mc
  58. cp next.mc /etc/sendmail/cf/cf/next.mc
  59.  
  60. #
  61. if [ -r /etc/sendmail/cf/domain/mydomain.m4 ]; then
  62.   echo
  63.   echo Backing up existing /etc/sendmail/cf/domain/mydomain.m4 to /etc/sendmail/cf/domain/mydomain.m4.prePPP
  64.   echo
  65.   mv /etc/sendmail/cf/domain/mydomain.m4 /etc/sendmail/cf/domain/mydomain.m4.prePPP
  66. fi
  67.  
  68. echo Installing mydomain.m4 in /etc/sendmail/cf/domain/mydomain.m4
  69. cp mydomain.m4 /etc/sendmail/cf/domain/mydomain.m4
  70.  
  71. if [ -r /etc/sendmail.cw ]; then
  72.   echo
  73.   echo Backing up existing /etc/sendmail.cw to /etc/sendmail.cw.prePPP
  74.   echo
  75.   mv /etc/sendmail.cw /etc/sendmail.cw.prePPP
  76. fi
  77.  
  78.  
  79. echo Installing sendmail.cw in /etc/sendmail.cw
  80. cp sendmail.cw /etc/sendmail.cw
  81.  
  82. #
  83. if [ -r /etc/sendmail.cf ]; then
  84.   echo
  85.   echo Backing up existing /etc/sendmail.cf to /etc/sendmail.cf.prePPP
  86.   echo
  87.   cp /etc/sendmail.cf /etc/sendmail.cf.prePPP
  88. fi
  89.  
  90. cd /etc/sendmail/cf/cf
  91. /usr/local/bin/m4 ../m4/cf.m4 next.mc > /etc/sendmail.cf
  92.  
  93. echo Installation finished.
  94.  
  95.  
  96.