TIP: Click on subject to list as thread! ANSI
echo: muffin
to: All
from: Vince Coen
date: 2003-06-20 20:38:16
subject: Max control commands

Hello All!

The file below is/was my OS/2 control file for running the Bink,max system I 
had one for each line. I hope that it will help anyone trying to create a 
bash script etc. Note that this was run using 4OS2 command processor.


=== Cut ===
Rem ----------   Warning this batch file uses commands unique to 4OS2 
--------------
Rem
:: LOG /W e:\log\binkley1.log

{at}echo off
:top

Set RBuf=3072
Set TBuf=2048
set bt=e:\bbs\btxh7
set max=e:\bbs\max
set maximus=e:\bbs\max\max.prm
set TZ=UTC0
rem set TZ=UTC0BST-1
Set XOUTBOUND=e:\bbs\bt\outbound

:bink
    if exist c:\flags\BTgotMal.flg goto squish
    if exist c:\flags\BTnetMal.flg goto squish

    cdd e:\bbs\btxh7
    bt32 TASK=1 dynam share config e:\bbs\btxh7\binkold.cfg
    if errorlevel 250 goto top
    if errorlevel 192 goto max
    if errorlevel 144 goto max
    if errorlevel 128 goto max
    if errorlevel 120 goto max
    if errorlevel 100 goto max
    if errorlevel 99 goto daily
    if errorlevel 98 goto IntPack
    if errorlevel 97 goto afix
    if errorlevel 96 goto max
    if errorlevel 95 goto poll
    if errorlevel 94 goto squish
    if errorlevel 80 goto max
    if errorlevel 72 goto max
    if errorlevel 70 goto fax
    if errorlevel 56 goto max
    if errorlevel 32 goto max
    if errorlevel 30 goto squish
    if errorlevel 24 goto max
    if errorlevel 20 goto squish
    if errorlevel 12 goto max
    if errorlevel 10 goto bink
    if errorlevel 2 goto top
    if errorlevel 1 goto end

    if exist c:\flags\BTgotMal.flg goto squish
    if exist c:\flags\BTnetMal.flg goto squish


goto bink

:squish

    If not exist f:\newfiles\nodediff.* goto squ1
    copy f:\newfiles\nodediff.* d:\update
    copy f:\newfiles\nodediff.* f:\newfiles\newdiffs
    del  f:\newfiles\nodediff.*

:: in procdiff.btm
::    pushd e:\bbs\allfix
::    allfix f
::    popd

    start "Process Diffs" /B c:\os2\procdiff.btm
    goto squ3

:squ1
    if not exist c:\flags\diffs.zzz goto squ2
    cd e:\bbs\nodelist
    fastlst
    cdd f:\adept\mailer\nodelist
    fastlst
    cdd e:\bbs\btxh7
    del c:\flags\diffs.zzz

:squ2
    Iff exist f:\newfiles\*.tic .OR. exist s:\newsgate\in\*.tic then
        start "Allfix" /B c:\os2\allfix.cmd
    endiff

:squ3
    call e:\bbs\max\squish2.cmd
    del c:\flags\BTgotmal.flg > nul
    del c:\flags\BTnetmal.flg > nul

    cd e:\bbs\afix
    Afix scan -kecholist.na
    Afix Autocreate
    cd e:\bbs\max
    If exist e:\bbs\afix\rescan.cmd CALL e:\bbs\afix\rescan
    If exist e:\bbs\afix\rescan.cmd del e:\bbs\afix\rescan.cmd
    pushd \bbs\sqed
    register
    popd
    pushd \bbs\max
    squish squash
    popd

    pushd e:\bbs\allfix\beta600
    allfix mgr
    popd

    cd e:\bbs\btxh7
    goto bink

:max
    CALL spawnbbs
rem cd e:\bbs\max
rem if exist do_fb.cmd call do_fb.cmd
rem if exist do_fb.cmd del do_fb.cmd
    cdd e:\bbs\btxh7
    goto bink

:: :flm2
:: ----------------- Fire up Flm2 scan ---------------------------
::  start "FLM2B" /DOS /B c:\os2\filemgr2.bat
::    goto bink

:poll

:: Poll Simon Avery every morning at 06:00
::   adjust addr 255/90 to 255/91
::  goto squish

    iff exist e:\bbs\bt\outbound\00ff005a.hut then
       ren e:\bbs\bt\outbound\00ff005a.hut 00ff005b.cut
    endiff

    iff exist e:\bbs\bt\outbound\00ff005a.hlo then
       ren e:\bbs\bt\outbound\00ff005a.hlo 00ff005b.clo
    else
       call FlowFile 2:255/91 C
    endiff

    goto bink
    goto squish

:fax
:: ----------------- Fire up Fax processing ----------------------
    goto bink

:afix
:: ----------------- Run Afix scan and Filemgr mgr ---------------
    cd e:\bbs\afix
    Afix scan -kecholist.na
    Afix Autocreate
    cd e:\bbs\max
    If exist e:\bbs\afix\rescan.cmd CALL e:\bbs\afix\rescan.cmd
    If exist e:\bbs\afix\rescan.cmd del e:\bbs\afix\rescan.cmd
    start "AllFix" /B c:\os2\Allfix2.cmd
    cd e:\bbs\btxh7
    goto bink

:IntPack
:: -----------------  Any mail for newsgate --------------------
:: ZONE 2 point 99

    pushd e:\bbs\bt\outbound\01010261.pnt
    iff ISDIR s:\newsgate\out then
      iff exist 0000ff9d.* then
         pushd temp
         unzip ..\0000ff9d.*
         move *.pkt s:\newsgate\out
         del   ..\0000ff9d.*
         del   ..\00000063.hlo
         popd
      endiff
    endiff
    popd

:: ------------------ Any mail for NWstar  - Bob Seaborn ---------------
::   ZONE 1

    pushd \bbs\bt\outbound.001
    iff ISDIR s:\users\vince\ftpout then
      iff exist 00750261.* then
         move 00750261.* s:\users\vince\ftpout
         del  008c0000.hlo
      endiff
    endiff
::    popd

:: ------------------ Any mail for Janis  - Janis Kracht --------------

::    pushd \bbs\bt\outbound.001

    iff ISDIR s:\users\vince\ftpout then
      iff exist f7f1023b.* then
         move f7f1023b.* s:\users\vince\ftpout
         del  09100026.hlo
      endiff
    endiff
    popd

:: --------------- Any mail for Lukas De Groen -- Dreamlandbbs.com -----
:: ZONE 2

    pushd \bbs\bt\outbound
    iff ISDIR s:\users\vince\ftpout then
      iff exist ffe9fe5e.* then
         move ffe9fe5e.* s:\users\vince\ftpout
         del  01180403.hlo
      endiff
    endiff
    popd

    goto bink

:daily
::  ---------------- run makenl for Hub and Net ------------------
    iff %_DAY% < 8 then
        cd e:\makenl
        makenl net257.ctl >> e:\log\makenl.log
        mnfix e:\makenl\net257.ctl LOG:e:\makenl\net257.log
    endiff
rem    makenl net444.ctl >> e:\log\makenl.log
rem    mnfix e:\makenl\net444.ctl LOG:e:\makenl\net444.log

::  ---------------- check AreaFix msgs  -------------------------
    cd e:\bbs\afix
    Afix scan -kecholist.nak
    Afix Autocreate

::  iff %_DAY% == 1 then
::     Afix notify
::  endiff

::    cd e:\bbs\max\bwave
::    BWSETUP2 PURGE 100
    cd e:\bbs\max
    mupurgep
    If exist e:\bbs\afix\rescan.cmd CALL e:\bbs\afix\rescan.cmd
    If exist e:\bbs\afix\rescan.cmd del e:\bbs\afix\rescan.cmd

:: allfix3.cmd includes check for 1st day of month

    start "AllFix" /B c:\os2\allfix3.cmd
    squish in out squash

::  ---------------- Pack the msg base   -----------------
    cd e:\bbs\max
    echo ----------- running SqPack --------------
::    SqPack area.dat >> e:\bbs\log\sqpack.log
    SqPack f:\squish\*.sqd >> e:\bbs\log\sqpack.log
    SqPack f:\squish2\*.sqd >> e:\bbs\log\sqpack.log
    sqlinkp squish.cfg *
    cd xdlc
    xdlc2 /cxdlcinit.ctl /i *
    xdlc2
    cd ..

::  ----------------- pack the file lists ------------------
    cd e:\bbs\downsort
    downsort
rem del e:\bbs\downsort\temp\*.bbs
    copy 257-609?.txt d:\bbs\general
    copy 257-609a.os2 d:\bbs\general
    copy 257-609n.txt e:\bbs\max\olr\newfiles.dat
    zip -u d:\bbs\general\257-609A 257-609a.txt
    zip -u d:\bbs\general\257-609N 257-609n.txt
    zip -u d:\bbs\general\257-609S 257-609a.os2
    del 257-609?.*
    ipfc newfiles.ipf /INF
    ipfc allfiles.ipf /INF
    rar2 u d:\bbs\general\257-609B allfiles.inf
    rar2 u d:\bbs\general\257-609C newfiles.inf
    del ???files.ipf
    del ???files.inf
    cd \bbs\max
    qfb -c13 -d -n

rem ----------------- Re-build the Filelist for Max ----------
rem    start "BfsMake" /WIN c:\os2\bfsmakes.cmd
    cdd e:\bbs\btxh7
    del d:\bbs\*.bak /s
    del f:\bbs\*.bak /s

rem ------------------ Clear out unneeded dlls's ---------------------
    allocmem

::     start "Squish1#" /B e:\bbs\btxh7\squish6.cmd

    goto bink

:end
   exit

=== Cut ===

Vince

--- Linux/Mbse/GoldED+/LNX 1.1.5-20709
* Origin: Air Applewood, Linux Gateway for Essex (2:257/609)
SEEN-BY: 633/267 270
@PATH: 257/609 250/501 140/1 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.