• Mystic/Rasberry Pi running as DAEMON

    From bamageek@21:1/140 to All on Tuesday, January 03, 2017 12:35:00
    Well I had a power failure last night so the Rasberry PI got rebooted this morning. I started googling ways to start mystic up automagically and have tried a few things, but ended up creating a script in my /etc/rc.d folder
    which I hope to use to start and stop mis and mis2.

    In doing this I decided to start mis in DAEMON mode (ie mis -d). However, on
    my shutdown script I'm not finding a way to shutdown mystic. Does anyone
    have a way to do this?

    Here's my /etc/init.d/bbs script so far:

    #! /bin/sh
    # /etc/init.d/noip


    case "$1" in
    start)
    echo "Starting Mystic"
    sudo /mystic/mis -d
    sudo /mystic/mis2 root /mnt/usbdrive/mystic DAEMON
    ;;

    stop)
    echo "Stop Mystic"
    sudo /mystic/mis2 SHUTDOWN
    ;;

    *)
    echo "Usage: /etc/init.d/bbs {start|stop}"
    exit 1
    ;;
    esac

    /**Dave's BBS telnet://davesbbs.com
    * @version 2.0 fsxNet: 21:1/140
    * GatorNet: 57:57/38
    **/

    --- Mystic BBS v1.12 A31 (Raspberry Pi)
    * Origin: Daves BBS (21:1/140)
  • From Malthous@21:1/189 to bamageek on Tuesday, January 03, 2017 20:52:00
    stop)
    echo "Stop Mystic"
    PID=$(cat /mysticpath/semaphore/mis.bsy)
    kill $PID

    sudo /mystic/mis2 SHUTDOWN
    ;;

    try adding the above the pid is stored in the mis.bsy file. you may want to add some error checking to make sure the process is actually running.

    - Malthous -
    Of all the things I've lost, I miss my mind the most.

    --- Mystic BBS v1.12 A31 (Linux)
    * Origin: KernelError Networks BBS (21:1/189)
  • From Vk3jed@21:1/109 to bamageek on Wednesday, January 04, 2017 14:18:00
    bamageek wrote to All <=-

    In doing this I decided to start mis in DAEMON mode (ie mis -d).
    However, on my shutdown script I'm not finding a way to shutdown
    mystic. Does anyone have a way to do this?

    killall mis

    That will do the trick, tell mis to shut down gracefully. :)


    ... AAcckk!! II''mm iinn hhaallff dduupplleexx
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (21:1/109)
  • From bamageek@21:1/140 to Malthous on Tuesday, January 03, 2017 22:02:00
    PID=$(cat /mysticpath/semaphore/mis.bsy)
    kill $PID

    Looks like that did the trick.

    Thanks for the feedback!

    Dave

    /**Dave's BBS telnet://davesbbs.com
    * @version 2.0 fsxNet: 21:1/140
    * GatorNet: 57:57/38
    **/

    --- Mystic BBS v1.12 A31 (Raspberry Pi)
    * Origin: Daves BBS (21:1/140)