$ ! NEWS_SYSTARTUP.COM $ ! $ ! Based on SETUP_LOG_EXAMPLE.COM from News 5.7 distribution. $ ! $ ! Normally invoked by UUCP_SYSTARTUP.COM . $ ! $ ! Author: $ ! G Huston $ ! Computer Services Centre $ ! Australian National University $ ! $ ! Version: $ ! V1.0 17-Jul-1986 $ ! V2.0 16-Jul-1987 $ ! V4.3 12-Jan-1987 GIH $ ! V5.2 26-Apr-1988 GIH $ ! V5.6 3-Nov-1988 GIH $ ! V5.7A 08-Feb-1989 Mark Pizzolato (for DECUS UUCP) $ ! V5.7B 01-Apr-1989 Jamie Hanrahan (for DECUS UUCP) $ !********************************************************************** $ $ defsys = "DEFINE/SYSTEM/EXEC/NAME=NO_ALIAS" $ defsysconc = "DEFINE/SYSTEM/EXEC/TRANSLATION=CONCEALED/NAME=NO_ALIAS" $ ON ERROR THEN GOTO BAD_OPTION $ IF ("''p1'" .NES. "") THEN GOTO 'f$extr(0,4,p1)' $ GOTO COMMON_START $ $BAD_OPTION: $ WRITE SYS$OUTPUT "Valid options: " $ WRITE SYS$OUTPUT "LOGICALS, INSTALLS, BATCH_JOBS, DEINSTALL, or empty" $ EXIT $ $ COMMON_START: $ $ LOGI: $ $! ******************************************************************** $! **** **** $! **** Local customizations begin here **** $! **** **** $! ******************************************************************** $ $ ! $ ! root of news database directory tree $ ! $ defsys NEWS_ROOT UUCP_DISK:[UUCP.NEWS] $ defsysconc NEWS_DEVICE UUCP_DISK:[UUCP.NEWS.] $ $ ! This logical equates to the username (NEWSMGR is recommended in the $ ! News documentation) under which the News batch jobs will run. This $ ! is used in a subsequent SUBMIT command. The corresponding INIT/QUEUE $ ! command assumes that an identifier of this name also exists. $ $ defsys NEWS_MGR_UN NEWSMGR $ $ ! the following two logical names are the mail destinations used by $ ! other sites when forwarding news as mail. These logicals point all $ ! such mail at the "news manager" account described above. This purpose $ ! could also be served by giving the following commands to Mail: $ ! $ ! MAIL> SET FORWARD/USER=RNEWS NEWS_MGR_UN $ ! MAIL> SET FORWARD/USER=NEWSMAIL NEWS_MGR_UN $ $ defsys RNEWS 'f$logi("NEWS_MGR_UN")' $ defsys NEWSMAIL 'f$logi("NEWS_MGR_UN")' $ $ ! People who do news management functions (creating newsgroups, etc.) must $ ! own the identifier named by this logical, as must the username under which $ ! the NEWSSKIM batch job will run (named by the logical NEWS_MGR_UN). This $ ! identifier must be *different* from that username so that it can be granted $ ! to other usernames. $ $ defsys NEWS_MGR_ID NEWSMANAGER $ $ ! the node address is the internet address of the node $ $ defsys NEWS_ADDRESS 'f$logi("UUCP_DOMAIN_NAME")' $ $ ! the node name is NOT (necessarily) a DECnet node name, but rather the $ ! name by which this site will be known to the rest of the News world -- $ ! generally the same as the uucp host name. This should be the same $ ! as the name of the system as defined in the NEWS.SYS entry that defines $ ! the local node's filter set. $ $ defsys NEWS_NODE "simpact" $ $ ! The "work directory" for news - normally sys$login of the news manager $ ! account $ $ defsys NEWS_MANAGER UUCP_DISK:[UUCP.NEWS_MGR] $ defsysconc NEWS_MANAGER_DEV UUCP_DISK:[UUCP.NEWS_MGR.] $ $ ! The news log directory. This is new for DECUS UUCP. $ $ defsys NEWS_LOG UUCP_DISK:[UUCP.NEWS_LOG] $ $ ! Organisation name (placed in headers of locally-created messages) $ $ defsys NEWS_ORGANISATION - "Simpact Associates, San Diego CA" $ $ ! Batch Queue to run NEWSSKIM.COM , which does Expired-Skimming, Delivery, $ ! and Remote Posting. $ ! $ ! THIS QUEUE *MUST* BE SINGLE-THREADED, IE HAVE A /JOB_LIMIT OF 1, $ ! so already-existing queues might not be suitable. $ ! $ ! (see the BATCH_JOBS entry below) $ $ defsys NEWS_BATCH_QUEUE NEWS_BATCH $ $ ! If you are running this on a VAX Cluster, you must specify $ ! which node will be the execution node for the queue defined by $ ! the above logical NEWS_BATCH_QUEUE. If you are not on a cluster $ ! leave this defined as "-" . (If you convert to a cluster $ ! environment later, don't forget to change this.) $ $ defsys NEWS_BATCH_NODE DCS $ $ ! when adding news batches from other systems, should `control' messages $ ! (other than cancels) be executed automatically (Y) or just mailed to $ ! the local username, USENET (N)? $ $ defsys NEWS_EXECUTE_CONTROL "N" $ $ ! when adding news batches from other systems, if items arrive for groups $ ! which do not exist on the local machine, should the groups be created $ ! automatically (Y) or not (N)? $ $ defsys NEWS_AUTO_CREGRP "Y" $ $ ! define the time zone string to be put in news headers. $ $ defsys NEWS_TIMEZONE 'f$logi("UUCP_TIME_ZONE")' $ $ IF ("''p1'" .NES. "") THEN EXIT $ $ INST: $ $ @'f$environment("PROCEDURE")' DEINSTALL $ $ ! Install the News user interface program with sysprv. $ $ install = "$install/command_mode" $ install add NEWS_ROOT:NEWS/OPEN/HEAD/SHARE/PRIV=SYSPRV exit $ $ IF ("''p1'" .NES. "") THEN EXIT $ $ BATC: $ $ ! make sure the queue exists, and start it in any case. $ ! The working set values shown here were not picked arbitrarily. $ ! The large WSEXTENT is needed for MAKEPATHS (which is invoked by $ ! NEWSSKIM on the first run of the day, if new maps have arrived through $ ! the news). $ ! $ ! THIS QUEUE MUST HAVE A /JOB_LIMIT OF ONE, NO MORE. $ ! $ ! THIS QUEUE SHOULD NOT BE STARTED FROM SYSTARTUP.COM UNLESS THIS $ ! IS DONE AFTER UUCP_SYSTARTUP HAS COMPLETED. Otherwise, NEWSSKIM $ ! might try to send things out via uucp before the UUCP_ logicals $ ! exist. Note that UUCP_SYSTARTUP has a provision to start this $ ! command proc at the appropriate time, if invoked with the correct $ ! P2 parameter. $ $ START = "/START" $ IF .NOT.F$GETSYI("CLUSTER_MEMBER") THEN GOTO INIT_Q $ BATCH_NODE = F$LOGICAL("NEWS_BATCH_NODE") $ START = START + "/ON=" + BATCH_NODE + "::" $ IF BATCH_NODE.NES.F$GETSYI("NODENAME") THEN START = START - "/START" $INIT_Q: $! $! $ INITIALIZE/QUEUE 'START' /BATCH - /OWNER=['f$logi("NEWS_MGR_UN")'] - /PROT=(OWNER:RWD,GROUP:RWD,WORLD) - /JOB_LIMIT=1 /BASE_PRIO=2 - /WSQUOTA=1024 /WSEXTENT=4096 - 'f$logi("NEWS_BATCH_QUEUE")' $ $ ! Start the SKIM and Delivery Batch Job. $ ! we don't want to do this if the job is already in the queue. $ ! Under V5 we'll have f$getqui, but... $ $ DEFINE/USER SYS$OUTPUT TEMP.TXT $ SHOW QUEUE/ALL NEWS_BATCH_QUEUE $ DEFINE/USER SYS$OUTPUT NL: $ DEFINE/USER SYS$ERROR NL: $ SEARCH TEMP.TXT NEWSSKIM $ IF ($STATUS .EQ. 1) THEN GOTO JOB_QUEUED $ $ ! We let the first invocation of this run now, and the automatic $ ! resubmit will work with the desired intervals. $ $ SUBMIT/LOG=NEWS_LOG:/NOPRINT - /USER='f$logi("NEWS_MGR_UN")'- /QUEUE=NEWS_BATCH_QUEUE - NEWS_MANAGER:NEWSSKIM.COM $ $JOB_QUEUED: $ DELETE TEMP.TXT; $ $ EXIT $ $ ! $ ! Deinstall and/or Shutdown NEWS $ ! $ DEIN: $ SHUT: $ install = "$install" $ if f$file_attributes("NEWS_ROOT:NEWS.EXE","KNOWN") THEN - install NEWS_ROOT:NEWS.EXE/delete $ EXIT