home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / comm / Mail+News / UMS11 / UMS-Install < prev    next >
Text File  |  1995-09-06  |  13KB  |  598 lines

  1. ; $VER: Install-UMS 11 (06.09.95)
  2.  
  3. ( if (= @language "english")
  4. (
  5.   (set #intro
  6.   (cat "Installing Universal Message System V11..."
  7.   ))
  8.   (set #info
  9.   (cat "This installation script only configures a basic UMS system with "
  10.         "only one single user and no newsfeeds.\n\n"
  11.  
  12.         "In order to run a point on any network you need to install "
  13.         "the required network drivers.\n\n"
  14.   ))
  15.   (set #dest
  16.   (cat "In which disk or drawer should Universal Message System be "
  17.        "installed?\n\n"
  18.  
  19.        "(This script does not create a sub drawer for UMS).\n\n"
  20.  
  21.        "You can install in place (just select ok)."
  22.   ))
  23.   (set #envoy
  24.   (cat "Do you want to run UMS server on this machine or do you want "
  25.        "to access the message base over a local area network using "
  26.        "the networking software Envoy?"
  27.   ))
  28.   (set #amitcp
  29.   (cat "Do you want to run UMS server on this machine or do you want "
  30.        "to access the message base over a local area network using "
  31.        "the networking software AmiTCP?"
  32.   ))
  33.   (set #localmb
  34.   (cat "message base is on this machine"
  35.   ))
  36.   (set #remotemb
  37.   (cat "message base is accessed via network"
  38.   ))
  39.   (set #umsservice
  40.   (cat "Do you want to export UMS as an Envoy service?\n"
  41.        "(This enables other machines in a local area network "
  42.        "to use the message base of this machine over the net)"
  43.   ))
  44.   (set #umsd
  45.   (cat "Do you want to export UMS using TCP/IP?\n"
  46.        "(This enables other machines in a local area network "
  47.        "to use the message base of this machine over the net)"
  48.   ))
  49.   (set #instrexxdos
  50.   (cat "Installing rexxdossupport.library"
  51.   ))
  52.   (set #instflush
  53.   (cat "Installing flush.library"
  54.   ))
  55.   (set #instumslib
  56.   (cat "Installing ums.library"
  57.   ))
  58.   (set #instumslib10
  59.   (cat "Installing ums.library ('010 version)"
  60.   ))
  61.   (set #instserver
  62.   (cat "Installing UMS Server"
  63.   ))
  64.   (set #instserver10
  65.   (cat "Installing UMS Server ('010 version)"
  66.   ))
  67.   (set #servicedrawer
  68.   (cat "In which drawer should ums.service be placed?"
  69.   ))
  70.   (set #instservice
  71.   (cat "Installing UMS Service"
  72.   ))
  73.   (set #instumsd
  74.   (cat "Installing UMS Deamon"
  75.   ))
  76.   (set #activateservice
  77.   (cat "Please activate \"ums.service\" using Envoy's \"Services Manager\""
  78.   ))
  79.   (set #updaterexxx
  80.   (cat "Updating ARexx Scripts"
  81.   ))
  82.   (set #updatescripts
  83.   (cat "Updating AmigaDOS Scripts"
  84.   ))
  85.   (set #mbdest
  86.   (cat "In which disk or drawer should the message base be placed?\n"
  87.        "(you get better performance increase if you place the "
  88.        "message base on a seperate partition with a larger block "
  89.        "size!)"
  90.   ))
  91.   (set #globconf
  92.   (cat "Now configuring global variables"
  93.   ))
  94.   (set #fullname
  95.   (cat "Please enter your full name"
  96.   ))
  97.   (set #short
  98.   (cat "Please enter your short (nick) name"
  99.   ))
  100.   (set #password
  101.   (cat "Please enter your password"
  102.   ))
  103.   (set #envexists
  104.   (cat "ENV:UMSSERVER ist already set. Overwrite this environment variable?"
  105.   ))
  106.   (set #whichserver
  107.   (cat "Please enter the name of the UMS server you want to use.\n\n"
  108.        "This name consists of two parts. The part following "
  109.        "the \"@\" sign is the name of the machine the server "
  110.        "is running on. The other part is the name of the "
  111.        "message base on this server. Use \"default\" in order "
  112.        "to get the default message base of this server."
  113.   ))
  114.   (set #confexists
  115.   (cat "ums.config already exists in your message base. Overwrite "
  116.        "this configuration file?"
  117.   ))
  118.   (set #instpaths
  119.   (cat "Installing Paths for UMS (binaries/scripts)"
  120.   ))
  121.   (set #uniquename
  122.   (cat "Please enter a unique name (domain address) for your computer\n\n"
  123.   
  124.        "For RFC-Systems it's easy: just use your fully qualified domain "
  125.        "name\n\n"
  126.  
  127.        "FTN Systems must convert their fido address to RFC style (eg. "
  128.        "\"2:2471/1216.3\" must be converted to "
  129.        "\"p3.f1216.n2471.z2.fidonet.org\"\n\n"
  130.  
  131.        "It's VERY important that you enter a correct string!"
  132.   ))
  133.   (set #envalreadyset
  134.   (cat "ENV:UMSMB.default ist already set. Overwrite this environment "
  135.        "variable?"
  136.   ))
  137.   (set #appenddb
  138.   (cat "In order to allow UMS to work with AmiTCP the files "
  139.        "\"AmiTCP:db/services\" and \"AmiTCP:db/inetd.config\" must be "
  140.        "extended. Should this be done automatically (the old files will "
  141.        "be backupped)?"
  142.   ))
  143. ;  (set #
  144. ;  (cat
  145. ;  ))
  146. ))
  147.  
  148. (transcript #intro)
  149.  
  150. (complete 0)
  151.  
  152. (message #info)
  153.  
  154. (set @default-dest
  155.   (expandpath
  156.     (askdir
  157.       (prompt #dest)
  158.       (help @askdir-help)
  159.       (default (expandpath ""))
  160.     )
  161.   )
  162. )
  163.  
  164. (set inplace (= (expandpath "") @default-dest))
  165.  
  166. (if (= inplace 0)
  167.   (
  168.     (copyfiles
  169.       (help @copyfiles-help)
  170.       (prompt #copying)
  171.       (source "")
  172.       (dest @default-dest)
  173.       (all)
  174.       (optional "force" "askuser")
  175.     )
  176.   )
  177. )
  178.  
  179. (if (<> (substr @default-dest (- (strlen @default-dest) 1) 1) ":")
  180.   (
  181.     (set @default-dest (cat @default-dest "/"))
  182.   )
  183. )
  184.  
  185.  
  186. (complete 25)
  187.  
  188. ; -------------------------------------------------------------------------
  189.  
  190. (set envoy (exists "LIBS:nipc.library"))
  191. (set amitcp (exists "AmiTCP:AmiTCP"))
  192.  
  193. (if envoy
  194.   (
  195.     (set envoyclient
  196.       (askchoice
  197.         (prompt #envoy)
  198.         (default 0)
  199.         (help @askchoices-help)
  200.         (choices #localmb
  201.                  #remotemb)
  202.       )
  203.     )
  204.     (if (= envoyclient 0)
  205.       (
  206.         (set envoyserver
  207.           (askbool
  208.             (prompt #umsservice)
  209.             (default 0)
  210.             (help @askbool-help)
  211.           )
  212.         )
  213.       )
  214.     )
  215.   )
  216.   (
  217.     (set envoyclient 0)
  218.   )
  219. )
  220.  
  221. (if amitcp
  222.   (
  223.     (if (= envoy 0)
  224.       (
  225.         (set tcpclient
  226.           (askchoice
  227.             (prompt #amitcp)
  228.             (default 0)
  229.             (help @askchoices-help)
  230.             (choices #localmb
  231.                      #remotemb)
  232.           )
  233.         )
  234.       )
  235.     )
  236.   )
  237. )
  238.  
  239. (if amitcp
  240.   (
  241.     (if (= tcpclient 0)
  242.       (
  243.         (set tcpserver
  244.           (askbool
  245.             (prompt #umsd)
  246.             (default 0)
  247.             (help @askbool-help)
  248.           )
  249.         )
  250.       )
  251.     )
  252.   )
  253.   (
  254.     (set tcpclient 0)
  255.   )
  256. )
  257.  
  258. (set client 0)
  259. (if envoyclient
  260.   (
  261.     (set client 1)
  262.   )
  263. )
  264. (if tcpclient
  265.   (
  266.     (set client 1)
  267.   )
  268. )
  269.  
  270. (complete 50)
  271.  
  272. ; -------------------------------------------------------------------------
  273.  
  274. (copylib
  275.   (help @copylib-help)
  276.   (prompt #instrexxdos)
  277.   (confirm)
  278.   (source "libs/rexxdossupport.library")
  279.   (dest "LIBS:")
  280. )
  281.  
  282. (if (= client 0)
  283.   (
  284.     (copylib
  285.       (help @copylib-help)
  286.       (prompt #instflush)
  287.       (confirm)
  288.       (source "libs/flush.library")
  289.       (dest "LIBS:")
  290.     )
  291.   )
  292. )
  293.  
  294. ; (set slowprocessor (= (database "cpu") "68000"))
  295.  
  296. (set slowprocessor 1)
  297.  
  298. ; (if slowprocessor
  299. ;   (
  300.     (copylib
  301.       (help @copylib-help)
  302.       (prompt #instumslib)
  303.       (confirm)
  304.       (source "libs/ums.library")
  305.       (dest "LIBS:")
  306.     )
  307. ;   )
  308. ;   (
  309. ;     (copylib
  310. ;       (help @copylib-help)
  311. ;       (prompt #instumslib10)
  312. ;       (confirm)
  313. ;       (source "libs/ums.library.010")
  314. ;       (newname "ums.library")
  315. ;       (dest "LIBS:")
  316. ;     )
  317. ;   )
  318. ; )
  319.  
  320. (complete 60)
  321.  
  322. (if (= client 0)
  323.   (
  324.     (if slowprocessor
  325.       (
  326.         (copylib
  327.           (help @copylib-help)
  328.           (prompt #instserver)
  329.           (confirm)
  330.           (source "l/umsserver")
  331.           (dest "L:")
  332.         )
  333.       )
  334.       (
  335.         (copylib
  336.           (help @copylib-help)
  337.           (prompt #instserver10)
  338.           (confirm)
  339.           (source "l/umsserver.nodebug010")
  340.           (newname "umsserver")
  341.           (dest "L:")
  342.         )
  343.       )
  344.     )
  345.     (if envoyserver
  346.       (
  347.         (set servicepath
  348.           (expandpath
  349.             (askdir
  350.               (prompt #servicedrawer)
  351.               (help @askdir-help)
  352.               (default "SYS:Envoy/Services")
  353.             )
  354.           )
  355.         )
  356.         (copylib
  357.           (help @copylib-help)
  358.           (prompt #instservice)
  359.           (confirm)
  360.           (infos)
  361.           (source "Envoy/services/ums.service")
  362.           (dest servicepath)
  363.         )
  364.         (message #activateservice)
  365.       )
  366.     )
  367.     (if tcpserver
  368.       (copylib
  369.         (help @copylib-help)
  370.         (prompt #instservice)
  371.         (confirm)
  372.         (infos)
  373.         (source "AmiTCP/serv/umsd")
  374.         (dest "AmiTCP:serv/")
  375.       )
  376.     )
  377.     (if (OR tcpserver tcpclient)
  378.       (
  379.         (set appenddb
  380.           (askbool
  381.             (prompt #appenddb)
  382.             (help @askbool-help)
  383.           )
  384.         )
  385.         (if appenddb
  386.           (
  387.             (rename "AmiTCP:db/services" "AmiTCP:db/services.bak")
  388.             (rename "AmiTCP:db/inetd.conf" "AmiTCP:db/inetd.conf.bak")
  389.             (textfile
  390.               (dest "AmiTCP:db/services")
  391.               (include "AmiTCP:db/services.bak")
  392.               (include "AmiTCP/db/services")
  393.             )
  394.             (textfile
  395.               (dest "AmiTCP:db/inetd.conf")
  396.               (include "AmiTCP:db/inetd.conf.bak")
  397.               (include "AmiTCP/db/inetd.conf")
  398.             )
  399.           )
  400.         )
  401.       )
  402.     )
  403.   )
  404. )
  405.  
  406. (complete 70)
  407.  
  408. ; -------------------------------------------------------------------------
  409.  
  410. (if (= envoyclient 0)
  411.   (
  412.     (set writeit 1)
  413.  
  414.     (if (= (exists "ENV:UMSMB.default") 1)
  415.       (
  416.         (set writeit
  417.           (askbool
  418.             (prompt #envalreadyset)
  419.             (help @askbool-help)
  420.           )
  421.         )
  422.       )
  423.     )
  424.  
  425.     (if writeit
  426.       (
  427.         (makedir (tackon @default-dest "mb"))
  428.         (set mbpath (tackon @default-dest "mb/"))
  429.  
  430.         (set mbpath
  431.           (expandpath
  432.             (askdir
  433.               (prompt #mbdest)
  434.               (help @askdir-help)
  435.               (default mbpath)
  436.             )
  437.           )
  438.         )
  439.         (textfile
  440.           (dest "ENV:UMSMB.default")
  441.           (append mbpath)
  442.         )
  443.  
  444.         (textfile
  445.           (dest "ENVARC:UMSMB.default")
  446.           (append mbpath)
  447.         )
  448.       )
  449.       (
  450.         (set mbpath (getenv "UMSMB.default"))
  451.       )
  452.     )
  453.   )
  454. )
  455.  
  456. (complete 80)
  457.  
  458. ; -------------------------------------------------------------------------
  459.  
  460. (set serverdefault "")
  461.  
  462. (if (= envoyclient 1)
  463.   (
  464.     (set serverdefault "default@envoyserver")
  465.   )
  466. )
  467.  
  468. (if (= tcpclient 1)
  469.   (
  470.     (set tcpdefault "host.do.main:ums")
  471.   )
  472. )
  473.  
  474. (if (<> serverdefault "")
  475.   (
  476.     (set writeit 1)
  477.     (if (= (exists "ENV:UMSSERVER") 1)
  478.       (
  479.         (set writeit
  480.           (askbool
  481.             (prompt #envexists)
  482.             (help @askbool-help)
  483.           )
  484.         )
  485.       )
  486.     )
  487.     (if writeit
  488.       (
  489.         (set umsserver
  490.           (askstring
  491.             (prompt #whichserver)
  492.             (default serverdefault)
  493.             (help @askstring-help)
  494.           )
  495.         )
  496.         (textfile
  497.           (dest "ENV:UMSSERVER")
  498.           (append umsserver)
  499.         )
  500.         (textfile
  501.           (dest "ENVARC:UMSSERVER")
  502.           (append umsserver)
  503.         )
  504.       )
  505.     )
  506.   )
  507. )
  508.  
  509. (complete 90)
  510.  
  511. ; -------------------------------------------------------------------------
  512.  
  513. (if (= client 0)
  514.   (
  515.     (set writeit 1)
  516.  
  517.     (if (= (exists (tackon mbpath "ums.config")) 1)
  518.       (
  519.         (set writeit
  520.           (askbool
  521.             (prompt #confexists)
  522.             (help @askbool-help)
  523.           )
  524.         )
  525.       )
  526.     )
  527.   )
  528.   (
  529.     (set writeit 0)
  530.   )
  531. )
  532.  
  533. (if writeit
  534.   (
  535.     (message #globconf)
  536.  
  537.     (set username
  538.       (askstring
  539.         (prompt #fullname)
  540.         (help @askstring-help)
  541.         (default "Joe User")
  542.       )
  543.     )
  544.  
  545.     (set shortusername
  546.       (askstring
  547.         (prompt #shortname)
  548.         (help @askstring-help)
  549.         (default "joe")
  550.       )
  551.     )
  552.  
  553.     (set password
  554.       (askstring
  555.         (prompt #password)
  556.         (help @askstring-help)
  557.         (default "joshua")
  558.       )
  559.     )
  560.  
  561.     (set domainaddress
  562.       (askstring
  563.         (prompt #uniquename)
  564.         (help @askstring-help)
  565.         (default "mycomputer.foo.bar")
  566.       )
  567.     )
  568.     (textfile
  569.       (dest (tackon mbpath "ums.config"))
  570.       (append (cat "( SysName \"" domainaddress "\" )\n\n"))
  571.       (append (cat "( LogFile \"" (tackon @default-dest "ums.log") "\" )\n\n"))
  572.       (append "( Sysop\n")
  573.       (append (cat "  ( Name \"" username "\" )\n"))
  574.       (append (cat "  ( Alias\n      \"" shortusername "\"\n"))
  575.       (append "      \"sysop\"\n")
  576.       (append "      \"root\"\n")
  577.       (append "      \"postmaster\"\n  )\n")
  578.       (append (cat "  ( Password \"" password "\" )\n"))
  579.       (append "  ( ReadAccess \"#?\" )\n")
  580.       (append "  ( WriteAccess \"#?\" )\n")
  581.       (append "  ( NetAccess \"#?\" )\n")
  582.       (append ")\n")
  583.     )
  584.   )
  585. )
  586.  
  587. (startup "UMS"
  588.   (prompt #instpaths)
  589.   (help @startup-help)
  590.   (set path (cat "\""     (expandpath (tackon @default-dest "bin")) "\"" ))
  591.   (set path (cat path " \"" (expandpath (tackon @default-dest "rexx")) "\"" ))
  592.   (command (cat "Path " path " ADD\n"))
  593. )
  594.  
  595. (complete 100)
  596.  
  597. (exit)
  598.