• Some Mystic scripts

    From bcw142@21:1/145.2 to All on Sun Jul 23 11:55:06 2017
    This is a collection of Mystic Scripts and Batch files for use with Mystic BBS. I use these versions, you'll have to customize them to yours. Mystic has almost everything built in, but a keep alive. I suspect that
    will be added, but in the meantime here's some with other useful scripts: ---------------------------------------------------------------------------
    Windows ---------------------------------------------------------------------------
    @ REM start-mystic.bat A Windows startup script
    @ REM From: Dan Richter aka Black Panther
    @ REM Sysop - Castle Rock BBS (RCS) telnet://castlerockbbs.com
    @REM edited by bcw142 Mystic Pi BBS at bcw142.zapto.org for my use ;)
    @REM CD \BBS\MYSTIC changed for my setup on \MYSTIC

    @REM not sure just adding MIS2 will work well, but it works for now
    if errorlevel 255 goto done
    if errorlevel 10 goto done
    if errorlevel 1 goto done
    goto crash

    TIMEOUT /T 30
    set T=%time:~0,5%
    set crash=%date:/=-% %T::=-%
    echo CRBBS MIS restarted - %crash% > restartlog.txt



    :done ---------------------------------------------------------------------------
    On exit you'll get a help message from g00r00 about mis something like:

    Syntax MIS <option>

    SERVER Start Mystic servers in interactive server mode
    DAEMON Start Mystic servers in daemon mode on Unix platforms
    SHUTDOWN Shutdown running servers on Unix platforms

    *Hit any key, then Control C and Y to fully exit the batch file. --------------------------------------------------------------------------- @REM /windows/mystic/poll.bat designed for feedback, you might want to
    @REM use '@REM pause' to stop it waiting.
    @ECHO ON
    mutil mailout
    @REM fsxnet
    fidopoll 21:1/145
    @REM RetroNet
    fidopoll 80:603/0
    @mutil mailin.ini

    Linux --------------------------------------------------------------------------- #!/bin/bash
    # start-mystic from Vk3jed
    # normally at /usr/local/bin/start-mystic
    #rm -f /tmp/upgrade # Used by semi-automatic upgrade process
    cd /mystic
    ./mis -d
    ./mis2 DAEMON

    --------------------------------------------------------------------------- Note: The above works, but not all all versions of Linux. I've found
    Vk3jed's check-mystic script to work better for startup on versions where
    the above doesn't do it. --------------------------------------------------------------------------- #!/bin/bash
    # check-mystic from Vk3jed he runs with below line in crontab
    # * * * * * root /usr/local/bin/check-mystic
    # Again, nodified for bcw142 at bcw142.zapto.org

    MYSTIC="/mystic" # Path to Mystic installation MIS2_OPTS="DAEMON" # Command line options for MIS2
    #UPGRADE=/tmp/upgrade # Need a flag to tell the script if we are #upgrading Mystic.
    #if [ -f $UPGRADE ]; then exit 0 ; fi # If we are upgrading Mystic, then
    PID=`/bin/pidof mis` # Determine if MIS is running.
    if [ "$PID" = "" ]; then # MIS has crashed, we will have to fix this!
    cd $MYSTIC
    rm -f semaphore/mis.bsy
    ./mis $MIS_OPTS
    PID2=`/bin/pidof mis2` # Determine if MIS2 is running.
    if [ "$PID2" = "" ]; then # MIS2 has crashed, we will have to fix this!
    cd $MYSTIC
    rm -f semaphore/mis2.bsy
    ./mis2 $MIS2_OPTS

    --------------------------------------------------------------------------- #!/bin/sh
    # /mystic/poll
    #./fidopoll forced
    #echo "Checking for fidopoll.bsy semaphore"
    if [ -f /mystic/semaphore/fidopoll.bsy ]; then
    ./fidopoll killbusy && rm /mystic/semaphore/fidopoll.bsy
    #point system polls main BBS

    --- Mystic BBS v1.12 A34 (Linux/64)
    * Origin: Mystic AlphaTest bcw142.zapto.org:2323 (21:1/145.2)