• MBSE script hatched out

    From Sean Dennis@1:18/200 to All on Mon Jul 7 13:35:25 2014
    Hello, All.

    I wrote a simple script to automate the nightly processing of my ALLFILES/NEWFILES listing by creating a proper FILE_ID.DIZ for each archive, creating the archive with the FILE_ID.DIZ, then adopting the files into my BBS with announcements. The archive is named mbsemkaf.zip.

    I've hatched it out my CH-WARE filebone if you carry it. If not, the file is also available at http://outpostbbs.net/files/mbsemkaf.zip.

    You can also FREQ the file via BinkP or ifcico at 1:18/200.

    Later,
    Sean

    ... There are three kinds of people: Those who can count and those who can't. --- GoldED+/LNX 1.1.5-b20130111
    * Origin: Outpost BBS * Johnson City, TN, USA (1:18/200)
  • From Vince Coen@2:250/1 to Sean Dennis on Tue Jul 8 11:43:39 2014
    Hello Sean!

    Monday July 07 2014 13:35, you wrote to All:

    I wrote a simple script to automate the nightly processing of my ALLFILES/NEWFILES listing by creating a proper FILE_ID.DIZ for each
    archive, creating the archive with the FILE_ID.DIZ, then adopting the
    files into my BBS with announcements. The archive is named
    mbsemkaf.zip.

    Found a problem with script:

    Line 37,38 & 43 etc :

    Remove line 37, replace all occurances of $MBSE_HOME with $MBSE_ROOT

    My processing sits in /etc/maint which runs at 07:00 daily.
    maint shows as:

    === Cut ===
    #!/bin/sh
    #
    # $Id: maint,v 1.2 2001/11/25 20:13:26 mbroek Exp $
    #
    # MBSE BBS Maintenance - Should be run from cron.
    # updated 12/09/02 VBC - modified for newfiles/allfiles and reordered
    # program execution.
    # updated 31/07/04 VBC - test for user mbse at runtime
    # updated 13/10/07 VBC - ad rm-f ???files.utf
    # updated 14/11/09 VBC - removed 257-609 processing

    if [ -z "$MBSE_ROOT" ]; then
    export MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print $6}'` fi
    if [ "`id -un`" != "mbse" ]; then
    echo "Must be run by user 'mbse'"
    exit 1
    fi

    # Don't do maintenance if running on UPS battery power.
    #
    if [ -f $MBSE_ROOT/var/sema/upsalarm ]; then
    exit 0
    fi

    $MBSE_ROOT/bin/mbuser pack kill 180 50 -quiet

    cd $MBSE_ROOT/tmp
    $MBSE_ROOT/bin/mball list -zip -quiet
    cp -f $MBSE_ROOT/etc/f/allfiles.diz FILE_ID.DIZ
    zip -umq allfiles FILE_ID.DIZ
    cp -f $MBSE_ROOT/etc/f/newfiles.diz FILE_ID.DIZ
    zip -umq newfiles FILE_ID.DIZ
    $MBSE_ROOT/bin/mbfido ti to -q

    cd ..
    $MBSE_ROOT/bin/mbmsg kill pack link -quiet
    $MBSE_ROOT/bin/mbaff announce filefind -quiet
    sleep 180; $MBSE_ROOT/bin/mbfile kill check pack index -quiet

    === Cut ===

    and etc/f/allfiles.diz :

    === Cut ===
    All files at Air Applewood zip'd.
    Updated 07:00 each day.
    === Cut ===

    and etc/f/newfiles.diz

    === Cut ===
    All new files (last 30 days) at Air
    Applewood zip'd. Updated 07:00 (local).

    === Cut ===

    The sleep 180 is a left over from when running with a dual 2 core E6600 but as now running a AMD FX8350 8 core is not really needed but left in JIC (just in case).

    Can see the usage of having the date imbedded within the file_id.diz along with
    additional info so will mod it to cater as well as rebuilding the file.


    Vince

    --- Linux/Mbse v1.1.02/GoldED+/LNX 1.1.5-b20120229
    * Origin: Air Applewood, The Linux Gateway to the UK (2:250/1)
  • From Sean Dennis@1:18/200 to Vince Coen on Tue Jul 8 15:09:34 2014
    Hello, Vince.

    08 Jul 14 at 11:43, you wrote to me:

    Found a problem with script:

    There's no problem with the script.

    Here's the line where I declare MBSE_HOME, not MBSE_ROOT:
    export MBSE_HOME=/opt/mbse

    That's what I used. Just because I do something differently doesn't mean it's wrong. Glad you could find some use for the script.

    Later,
    Sean

    ... Love is a long term investment, not a quick return loan!
    --- GoldED+/LNX 1.1.5-b20130111
    * Origin: Outpost BBS * Johnson City, TN, USA (1:18/200)