• running dosemu in a bash script

    From Embalmed@21:4/166 to All on Tue Feb 18 12:09:13 2020
    So I have my system running a shell script to do my polling/mail/and interbbs stuff. This script executes via the event system every hour.

    The interbbs batch file needs to be run in dosemu, when i run it from a
    prompt myself it works great

    dosemu interbbs.bat
    everything launches and works fine.

    I thought maybe it was related to the size of the window so I added the stty bit to my shell script and it still hangs.

    #!/bin/bash
    cd /opt/mystic
    ./fidopoll 77:1/100
    ./fidopoll 21:4/100
    stty cols 80 rows 25 && dosemu interbbs.bat /DOS
    echo 1 > semaphore/echomail.out

    Pretty simple script, but since it hangs on dosemu part mutil mailin and
    mutil mailout is not being ran because it never gets to the semaphore section.

    Anyone know how to make the dosemu part not hangup? Unfortunately I forgot
    to check /home/mystic/.dosemu/boot.log this morning when it was hung so I'm
    not sure if there was anything indicated in logs.

    |07E|10m|07b|10a|07l|10m|07e|10d |12-----------------------------------------------------
    |09Black Lodge Research BBS |11blacklodgeresearch.org:4022
    |11fsx|08Net: |0721:4/166 |11sci|08Net: |0777:1/133

    --- Mystic BBS v1.12 A44 2020/02/04 (Linux/64)
    * Origin: Black Lodge Research BBS (21:4/166)
  • From Al@21:4/106 to Embalmed on Tue Feb 18 12:26:28 2020
    dosemu interbbs.bat
    everything launches and works fine.

    Is the .bat completing it's tasks, and is there an exitemu at the end of
    it?

    Ttyl :-),
    Al

    --- MagickaBBS v0.13alpha (Linux/x86_64)
    * Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106)
  • From Embalmed@21:4/166 to Al on Tue Feb 18 12:36:43 2020
    Is the .bat completing it's tasks, and is there an exitemu at the end of it?

    There is no exitemu at the end of the script i will try adding that, but it doesn't seem to be necessary when running it from shell, and none of my batch scripts for the door games have exitemu in them.

    As for if it's completing its tasks i'm not really sure. it was hung up for a few hours so i had to manually kick things off when i woke up.

    |07E|10m|07b|10a|07l|10m|07e|10d |12-----------------------------------------------------
    |09Black Lodge Research BBS |11blacklodgeresearch.org:4022
    |11fsx|08Net: |0721:4/166 |11sci|08Net: |0777:1/133

    --- Mystic BBS v1.12 A44 2020/02/04 (Linux/64)
    * Origin: Black Lodge Research BBS (21:4/166)
  • From Al@21:4/106 to Embalmed on Tue Feb 18 12:55:54 2020
    There is no exitemu at the end of the script i will try adding
    that, but it doesn't seem to be necessary when running it from
    shell, and none of my batch scripts for the door games have exitemu
    in them.

    Mystic must have another way of quiting dosemu. I'll have to look into
    that one day. All of my bat files that run dos doors end with exitemu to
    get back to my linux prompt. It's just that .bat files that have exitemu,
    not the .sh scripts.

    As for if it's completing its tasks i'm not really sure. it was
    hung up for a few hours so i had to manually kick things off when i
    woke up.

    I would add "echo We got this/that done >>somefile.txt" in a couple
    places in the .bat so you can get a better idea if stuff is happening as
    you planned.

    Ttyl :-),
    Al

    --- MagickaBBS v0.13alpha (Linux/x86_64)
    * Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106)
  • From Netsurge@21:4/154 to Embalmed on Tue Feb 18 16:08:10 2020
    Anyone know how to make the dosemu part not hangup? Unfortunately I forgot to check /home/mystic/.dosemu/boot.log this morning when it was hung so I'm not sure if there was anything indicated in logs.

    DO you mean that the dosemu call you make doesn't return back to the bash script? If that is the case, in the .bat file you are calling add exitemu as the last command and it will exit dosemu and process the rest of your bash script.

    |15frank |08// |15netsurge
    |07disksh0p|08!|07bbs |08% |07bbs.diskshop.ca |08% |07mystic goodness |11SciNet |03ftn hq |08% |07https://scinet-ftn.org

    --- Mystic BBS v1.12 A45 2020/02/12 (Linux/64)
    * Origin: % disksh0p!bbs % bbs.diskshop.ca % SciNet ftn hq % (21:4/154)
  • From Embalmed@21:4/166 to Al on Tue Feb 18 13:08:42 2020
    I would add "echo We got this/that done >>somefile.txt" in a couple
    places in the .bat so you can get a better idea if stuff is happening as you planned.

    Good idea, some old fashioned logging ;)

    I looked at my netrunner maintenance script and noticed I was running it from events as
    dosemu /dumb netmaint.bat /DOS

    so I'm also going to try executing it that way. Should find out in a few minutes if that solves the issue.

    |07E|10m|07b|10a|07l|10m|07e|10d |12-----------------------------------------------------
    |09Black Lodge Research BBS |11blacklodgeresearch.org:4022
    |11fsx|08Net: |0721:4/166 |11sci|08Net: |0777:1/133

    --- Mystic BBS v1.12 A44 2020/02/04 (Linux/64)
    * Origin: Black Lodge Research BBS (21:4/166)
  • From Embalmed@21:4/166 to Netsurge on Tue Feb 18 13:23:43 2020
    Anyone know how to make the dosemu part not hangup? Unfortunately I forgot to check /home/mystic/.dosemu/boot.log this morning when it wa hung so I'm not sure if there was anything indicated in logs.

    DO you mean that the dosemu call you make doesn't return back to the bash script? If that is the case, in the .bat file you are calling add
    exitemu as the last command and it will exit dosemu and process the rest of your bash script.

    That is correct. I changed the command to run as dosemu /dumb interbbs.bat /DOS and added exitemu to interbbs.bat and it worked this time.

    Now to try it in the non-dumb version to see if the exitemu fixed it or the /dumb did.

    |07E|10m|07b|10a|07l|10m|07e|10d |12-----------------------------------------------------
    |09Black Lodge Research BBS |11blacklodgeresearch.org:4022
    |11fsx|08Net: |0721:4/166 |11sci|08Net: |0777:1/133

    --- Mystic BBS v1.12 A44 2020/02/04 (Linux/64)
    * Origin: Black Lodge Research BBS (21:4/166)
  • From Al@21:4/106 to Embalmed on Tue Feb 18 13:32:40 2020
    I would add "echo We got this/that done >>somefile.txt" in a
    couple places in the .bat so you can get a better idea if
    stuff is happening as you planned.

    Good idea, some old fashioned logging ;)

    I hate log files. I hate 'em.. ;)

    But there are times when they tell you what you need to know.. :)

    dosemu /dumb netmaint.bat /DOS

    I also need to -dumb argument when I run dosemu on slackware.

    My scripts that run a .bat file directly look like this, may or may not
    help you..

    /usr/bin/dosemu -dumb -quiet -f /doors/dosemu.conf -I "dosbanner 0" -E "D:\CHREACT\CHREACT.BAT" 1>/dev/null

    The -E tells dosemu to run that .bat file and at the end of that .bat
    file I have exitemu so when it'd done it quits dosemu and I am back at
    the prompt.

    Ttyl :-),
    Al

    --- MagickaBBS v0.13alpha (Linux/x86_64)
    * Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106)
  • From Embalmed@21:4/166 to All on Tue Feb 18 14:34:23 2020
    That is correct. I changed the command to run as dosemu /dumb interbbs.bat /DOS and added exitemu to interbbs.bat and it worked this time.

    Now to try it in the non-dumb version to see if the exitemu fixed it or the /dumb did.

    Looks like /dumb was not necessary, just adding exitemu to the end of the bat seems to fix it.

    I am still curious as to why this is needed when launched from a shell
    script but not needed when launched via DD from mystic itself.

    |07E|10m|07b|10a|07l|10m|07e|10d |12-----------------------------------------------------
    |09Black Lodge Research BBS |11blacklodgeresearch.org:4022
    |11fsx|08Net: |0721:4/166 |11sci|08Net: |0777:1/133

    --- Mystic BBS v1.12 A44 2020/02/04 (Linux/64)
    * Origin: Black Lodge Research BBS (21:4/166)
  • From Al@21:4/106 to Embalmed on Tue Feb 18 15:00:36 2020
    Looks like /dumb was not necessary, just adding exitemu to the end
    of the bat seems to fix it.

    Yep, -dumb is not usually needed. On my slackware box dosemu runs fine
    from the desktop but if I am at a console I need to add -dumb to the
    command line or it fails to run, complains about SDL..

    I am still curious as to why this is needed when launched from a
    shell script but not needed when launched via DD from mystic
    itself.

    I'm not sure. One day when I have some free time I'm going do some dosemu
    stuff with mystic and see how that all works.

    If I run dosemu from the command line to do some dosy stuff I have to
    enter "exitemu" to quit, or else it just sits there waiting for input.

    Ttyl :-),
    Al

    --- MagickaBBS v0.13alpha (Linux/x86_64)
    * Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106)
  • From g00r00@21:1/108 to Al on Tue Feb 18 17:33:03 2020
    Mystic must have another way of quiting dosemu. I'll have to look into that one day. All of my bat files that run dos doors end with exitemu to get back to my linux prompt. It's just that .bat files that have exitemu, not the .sh scripts.

    Mystic doesn't have any direct action with dosemu, so they likely do need an exitemu or maybe a command line option to have it exit after.

    --- Mystic BBS v1.12 A45 2020/02/17 (Windows/64)
    * Origin: Sector 7 (21:1/108)
  • From Embalmed@21:4/166 to Al on Tue Feb 18 15:10:40 2020
    If I run dosemu from the command line to do some dosy stuff I have to enter "exitemu" to quit, or else it just sits there waiting for input.

    If i run just dosemu
    then I have to do exitemu to get out

    if i run dosemu somebat.bat it executes the bat and returns me to prompt (without exitemu anywhere needed)

    as soon as a .sh script gets involved though it seems to need exitemu or it hangs up the event system (when i run it from terminal it works with or
    without exitemu and drops me back to prompt afterwards)

    I hate inconsistent behavior :P

    |07E|10m|07b|10a|07l|10m|07e|10d |12-----------------------------------------------------
    |09Black Lodge Research BBS |11blacklodgeresearch.org:4022
    |11fsx|08Net: |0721:4/166 |11sci|08Net: |0777:1/133

    --- Mystic BBS v1.12 A44 2020/02/04 (Linux/64)
    * Origin: Black Lodge Research BBS (21:4/166)
  • From Al@21:4/106 to Embalmed on Tue Feb 18 15:41:42 2020
    if i run dosemu somebat.bat it executes the bat and returns me to
    prompt (without exitemu anywhere needed)

    Your right, I just ran dosemu do.bat and it ran that bat file and exited,
    no exitemu involved.

    When I run dosemu -E do.bat it runs the bat file and when done is waiting
    for input so I need to do exitemu.

    It depends I guess how you invoke dosemu.

    Ttyl :-),
    Al

    --- MagickaBBS v0.13alpha (Linux/x86_64)
    * Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106)
  • From Netsurge@21:4/154 to Embalmed on Tue Feb 18 18:43:14 2020
    I am still curious as to why this is needed when launched from a shell script but not needed when launched via DD from mystic itself.

    When your run it from a shell it has an environment to return to, it doesn't when you are running it from say a cron. It's in the dosemu man.

    |15frank |08// |15netsurge
    |07disksh0p|08!|07bbs |08% |07bbs.diskshop.ca |08% |07mystic goodness |11SciNet |03ftn hq |08% |07https://scinet-ftn.org

    --- Mystic BBS v1.12 A45 2020/02/12 (Linux/64)
    * Origin: % disksh0p!bbs % bbs.diskshop.ca % SciNet ftn hq % (21:4/154)
  • From Black Panther@21:1/186 to Al on Tue Feb 18 18:39:14 2020
    On 18 Feb 2020, Al said the following...

    Mystic must have another way of quiting dosemu. I'll have to look into that one day. All of my bat files that run dos doors end with exitemu to get back to my linux prompt. It's just that .bat files that have exitemu, not the .sh scripts.

    Hmmm, I don't have exitemu in any of my .bat files that run in dosemu. Once they finish, the window is closed, and the .sh script continues...


    ---

    Black Panther(RCS)
    Castle Rock BBS

    --- Mystic BBS v1.12 A44 2020/02/04 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com (21:1/186)
  • From Embalmed@21:4/166 to Black Panther on Tue Feb 18 18:18:02 2020
    Hmmm, I don't have exitemu in any of my .bat files that run in dosemu. Once they finish, the window is closed, and the .sh script continues...

    I'm pretty convinced that exitemu is only required if -E is passed when
    calling and actually the -dumb is what fixed my interbbs.bat.

    |07E|10m|07b|10a|07l|10m|07e|10d |12-----------------------------------------------------
    |09Black Lodge Research BBS |11blacklodgeresearch.org:4022
    |11fsx|08Net: |0721:4/166 |11sci|08Net: |0777:1/133

    --- Mystic BBS v1.12 A44 2020/02/04 (Linux/64)
    * Origin: Black Lodge Research BBS (21:4/166)
  • From g00r00@21:1/108 to Embalmed on Tue Feb 18 21:20:53 2020
    I'm pretty convinced that exitemu is only required if -E is passed when calling and actually the -dumb is what fixed my interbbs.bat.

    Well thats dumb! ;)

    But I'm glad you figured it out, less work for me! lol

    --- Mystic BBS v1.12 A45 2020/02/17 (Windows/64)
    * Origin: Sector 7 (21:1/108)
  • From Netsurge@21:4/154 to Black Panther on Tue Feb 18 21:56:00 2020
    Hmmm, I don't have exitemu in any of my .bat files that run in dosemu. Once they finish, the window is closed, and the .sh script continues...

    The key with you is the word "window" as you are running a windows manager
    and xorg. Not the same if you run headless.

    |15frank |08// |15netsurge
    |07disksh0p|08!|07bbs |08% |07bbs.diskshop.ca |08% |07mystic goodness |11SciNet |03ftn hq |08% |07https://scinet-ftn.org

    --- Mystic BBS v1.12 A45 2020/02/12 (Linux/64)
    * Origin: % disksh0p!bbs % bbs.diskshop.ca % SciNet ftn hq % (21:4/154)
  • From Black Panther@21:1/186 to Netsurge on Tue Feb 18 20:04:32 2020
    On 18 Feb 2020, Netsurge said the following...

    Hmmm, I don't have exitemu in any of my .bat files that run in dosemu Once they finish, the window is closed, and the .sh script continues.

    The key with you is the word "window" as you are running a windows
    manager and xorg. Not the same if you run headless.

    Ah, got it. I didn't even think of that...


    ---

    Black Panther(RCS)
    Castle Rock BBS

    --- Mystic BBS v1.12 A44 2020/02/04 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com (21:1/186)
  • From Al@21:4/106 to Black Panther on Tue Feb 18 22:33:12 2020
    Hmmm, I don't have exitemu in any of my .bat files that run in
    dosemu. Once they finish, the window is closed, and the .sh script continues...

    I'm not sure why exitemu is needed sometimes and other times it isn't. In
    the meantime I'll keep an exitemu in my .bat files.. just in case.. :)

    Ttyl :-),
    Al

    --- MagickaBBS v0.13alpha (Linux/x86_64)
    * Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106)