• mrc linux/pi startup/script

    From bl00d@21:1/162 to All on Saturday, October 29, 2016 14:11:00
    It's been a (long) while since I messed with Linux and was wondering if
    someone could give me an example of how they are starting up MRC on a Pi or linux bbs and maybe a script that monitors it and restarts if needed.

    Thanks!

    Kev

    --- Mystic BBS v1.12 A31 (Raspberry Pi)
    * Origin: Razor's Domain 3.141592... (21:1/162)
  • From karl@21:1/161 to bl00d on Sunday, October 30, 2016 00:23:00
    someone could give me an example of how they are starting up MRC on a Pi or linux bbs and maybe a script that monitors it and restarts if needed.

    I use the following:

    --------------------
    #!/bin/bash

    ##### Config Begin #####
    path="/home/pi/mystic"
    client="./mrc_client.py"
    server="tbbs.homeip.net 5000"
    ###### Config End ######

    while true
    do

    client_count=$(ps -ef | grep $client | grep -v grep | wc -l | awk '{print $1}')

    if [ "$client_count" == "0" ]
    then
    cd $path
    $client $server >> $path/data/logs/mrc_client.log 2>&1 &
    fi
    sleep 1
    done
    --------------------

    --
    Karl
    The Search BBS

    --- Mystic BBS v1.12 A31 (Raspberry Pi)
    * Origin: The Search BBS (21:1/161)
  • From bl00d@21:1/162 to karl on Sunday, October 30, 2016 15:01:00
    I use the following:

    Thanks Karl!

    Kev

    --- Mystic BBS v1.12 A31 (Raspberry Pi)
    * Origin: Razor's Domain 3.141592... (21:1/162)