• jsexec & binkit.js issue

    From Dumas Walker@VERT/CAPCITY2 to ALL on Saturday, December 16, 2017 19:28:00
    Good evening,
    I have set up binkit and so far, so good, except for one small issue. I
    have my mail processing set up in a shell script that is executed by cron.
    When I run the script from an lxterminal window, jsexec & binkit run just
    fine.

    However, when cron calls the script, the jsexec/binkit step only shows the following output:

    Error opening terminal: unknown.

    I am using the following jsexec command line, which also works if I run it
    by itself:

    ./jsexec -c /sbbs/ctrl binkit.js -p

    I suspect that either jsexec or binkit.js does not like running without a terminal window to write to? I tried adding the -q option, to tell it not
    to write output to the terminal, and I got the same result.

    Is anyone else running jsexec and/or binkit.js from a shell script using
    cron?

    Thanks.

    ---
    þ SLMR 2.1a þ I can't pretend a stranger is a long-awaited friend...
    þ Synchronet þ CAPCITY2 * capcity2.synchro.net * 1-502-875-8938
  • From echicken@VERT/ECBBS to Dumas Walker on Saturday, December 16, 2017 20:41:09
    Re: jsexec & binkit.js issue
    By: Dumas Walker to ALL on Sat Dec 16 2017 19:28:00

    However, when cron calls the script, the jsexec/binkit step only shows the following output:

    Error opening terminal: unknown.

    I am using the following jsexec command line, which also works if I run it by itself:

    ./jsexec -c /sbbs/ctrl binkit.js -p

    I don't think I've ever tried to run a script via jsexec under cron. Is there a particular reason you're doing it as a cron job rather than a timed event within Synchronet?

    You might have some luck if you invoke jsexec with the -n and -q options, or the -e and -o options. (Run jsexec without parameters for more info on these.)

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Digital Man@VERT to Dumas Walker on Sunday, December 17, 2017 12:40:03
    Re: jsexec & binkit.js issue
    By: Dumas Walker to ALL on Sat Dec 16 2017 07:28 pm

    Good evening,
    I have set up binkit and so far, so good, except for one small issue. I have my mail processing set up in a shell script that is executed by cron. When I run the script from an lxterminal window, jsexec & binkit run just fine.

    However, when cron calls the script, the jsexec/binkit step only shows the following output:

    Error opening terminal: unknown.

    I'm pretty sure that error message is not from any Synchronet software.

    I am using the following jsexec command line, which also works if I run it by itself:

    ./jsexec -c /sbbs/ctrl binkit.js -p

    I suspect that either jsexec or binkit.js does not like running without a terminal window to write to? I tried adding the -q option, to tell it not to write output to the terminal, and I got the same result.

    Is anyone else running jsexec and/or binkit.js from a shell script using cron?

    Strange. Let me know what you find out.

    digital man

    Synchronet/BBS Terminology Definition #9:
    CR = Carriage Return (ASCII 13, Ctrl-M)
    Norco, CA WX: 64.2øF, 21.0% humidity, 4 mph SW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Dumas Walker@VERT/CAPCITY2 to ECHICKEN on Sunday, December 17, 2017 14:09:00
    I don't think I've ever tried to run a script via jsexec under cron. Is there >a particular reason you're doing it as a cron job rather than a timed event >within Synchronet?

    Yeah, I am trying to run it along with multiple other programs, like a
    couple of ftp steps for nodes that don't have binkp, and to move mail
    around to my points (which are also not binkp).

    You might have some luck if you invoke jsexec with the -n and -q options, or >the -e and -o options. (Run jsexec without parameters for more info on these.)

    Thanks. I tried the -q already (no dice) but did not yet try the others.

    ---
    þ SLMR 2.1a þ ...a host of holy horrors to direct our aimless dance...
    þ Synchronet þ CAPCITY2 * capcity2.synchro.net * 1-502-875-8938
  • From Dumas Walker@VERT/CAPCITY2 to DIGITAL MAN on Tuesday, December 19, 2017 18:41:00
    Error opening terminal: unknown.

    I'm pretty sure that error message is not from any Synchronet software.

    I am using the following jsexec command line, which also works if I run it >> by itself:

    ./jsexec -c /sbbs/ctrl binkit.js -p

    cron sends an email to the owner of the scheduled event which, in this
    case, is my bbs user. The programs that run immediately before and after jsexec binkit are both accounted for as far as output goes. In the slot
    where they'd be is where that error message comes in, in place of the normal binkit output.

    Could it be that one of them expects a terminal window to run in, which is
    then causing something in linux or bash or ??? to spit that error message
    out when one is not found?

    Strange. Let me know what you find out.

    So far, I have not found much out except that I can't get it to run when a terminal window is not open. :) Sometime this weekend, I hope to maybe
    get some time to play with it some more and try the command options that echicken (I think?) suggested but that I had not tried yet.

    I guess there is another option... if there is a way to get cron to open a terminal window when it calls a script. Having become used to that over
    the years of running boards under DOS and OS/2, I would not mind that at all.

    ---
    þ SLMR 2.1a þ She cried away her life since she fell off the cradle!!
    þ Synchronet þ CAPCITY2 * capcity2.synchro.net * 1-502-875-8938
  • From echicken@VERT/ECBBS to Dumas Walker on Tuesday, December 19, 2017 20:26:39
    Re: jsexec & binkit.js issue
    By: Dumas Walker to DIGITAL MAN on Tue Dec 19 2017 18:41:00

    get some time to play with it some more and try the command options that echicken (I think?) suggested but that I had not tried yet.

    I'm not sure if they'll make a difference, but they were -n and -q together, or -e<filename> and -o<filename> together. If it's still griping about a terminal after that, then it likely won't work in your situation (barring a change to the code or finding some external workaround).

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Dumas Walker@VERT/CAPCITY2 to ECHICKEN on Wednesday, December 20, 2017 18:23:00
    I'm not sure if they'll make a difference, but they were -n and -q together, or
    -e<filename> and -o<filename> together. If it's still griping about a terminal
    after that, then it likely won't work in your situation (barring a change to >the code or finding some external workaround).

    Ahhh, I missed the "together" part, too. I tried -q but not along with -n. Will give that shot when I get some free time in a couple of days. Thanks!

    ---
    þ SLMR 2.1a þ "Kills millions of germs on contract"
    þ Synchronet þ CAPCITY2 * capcity2.synchro.net * 1-502-875-8938
  • From Dumas Walker@VERT/CAPCITY2 to echicken on Saturday, December 23, 2017 13:50:05
    I'm not sure if they'll make a difference, but they were -n and -q together, or -e<filename> and -o<filename> together. If it's still griping about a terminal after that, then it likely won't work in your situation (barring a change to the code or finding some external workaround).

    Well, that did not work, either, but I found something that did:

    touch /sbbs/data/binkit.now
    sleep 1m

    That works real good. :D

    Thanks!

    ---
    þ Synchronet þ CAPCITY2 * capcity2.synchro.net * 1-502-875-8938
  • From echicken@VERT/ECBBS to Dumas Walker on Saturday, December 23, 2017 22:17:04
    Re: Re: jsexec & binkit.js issue
    By: Dumas Walker to echicken on Sat Dec 23 2017 13:50:05

    Well, that did not work, either, but I found something that did:

    touch /sbbs/data/binkit.now
    sleep 1m

    That'll do it, since Synchronet will then run binkit for you. The 'sleep' bit is ... probably okay, though ideally your script should have some way of knowing that binkit has actually completed its run. I can't think of a (good) way of doing that off the top of my head.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Dumas Walker@VERT/CAPCITY2 to ECHICKEN on Sunday, December 24, 2017 08:47:00
    touch /sbbs/data/binkit.now
    sleep 1m
    That'll do it, since Synchronet will then run binkit for you. The 'sleep' bit
    is ... probably okay, though ideally your script should have some way of knowing that binkit has actually completed its run. I can't think of a (good)
    way of doing that off the top of my head.

    Yeah, I am not 100% happy with that bit, either, but the next few steps in
    the script are independent of whether or not binkit (or FIDOIN) is running.
    They can run in parallel.

    ---
    þ SLMR 2.1a þ ....we came in?
    þ Synchronet þ CAPCITY2 * capcity2.synchro.net * 1-502-875-8938