• hash script for crontab..

    From Bill McGarrity@VERT/TEQUILAM to All on Thu Feb 9 03:06:00 2017
    OK.. just little ole me again with a question....

    Here is a bash script I put together to post a message in a general area...

    ==== Start

    #!/bin/bash



    cd /home/pi/sbbs/exec



    rm -r /home/pi/sbbs/exec/daystats.txt

    rm -r /home/pi/sbbs/exec/daygraph.txt



    cd /home/pi/binkd-1.1



    perl binkdstat-wk42.pl -s -l binkd.log -p -1 +1 > /home/pi/sbbs/exec/daystats.txt

    perl binkdstat-wk42.pl -l binkd.log -p -1 +1 -G -1 > /home/pi/sbbs/exec/daygraph.txt



    chmod 777 /home/pi/sbbs/exec/daystats.txt

    chmod 777 /home/pi/sbbs/exec/daygraph.txt



    cd /home/pi/sbbs/exec



    ./smbutil -fSportNetHub -tAll -sBink_Daily_Graph -i /home/pi/sbbs/exec/daygraph.txt /home/pi/sbbs/data/subs/1generals.shd


    ./smbutil -fSportNetHub -tAll -sBinkD_Daily_Stats -i /home/pi/sbbs/exec/daystats.txt /home/pi/sbbs/data/subs/1generals.shd



    ./sbbsecho -LINF > /home/pi/sbbs/events/outerror.log


    ===== End

    I run the above script as a SU and this is the result.

    ===== Start

    (there is a significant amout of 'chatter' before this but it really wasn't needed)

    Maintaining /home/pi/sbbs/data/subs/1generals

    Maintaining /home/pi/sbbs/data/subs/1generals hash file

    Loading index...

    2 of 2

    Done.



    Scanning for pre-flagged messages...

    100% (0 pre-flagged for deletion)

    Scanning for read messages to be killed...

    100% (0 flagged for deletion due to read status)



    !Error 2 opening home/pi/sbbs/exec/daystats.txt


    Returning error code: 1

    ===== End

    Perl creates the file without an issue.

    Now from what you can see in the 'script', I use chmod to allow anyone the ability to do whatever they deemed fit with it, yet... why does smbutil have an issue opening the file?

    Appreciate your time...

    Thanks


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net:81
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    --- MultiMail/Win32 v0.50
    Synchronet TequilaMockingbird Online - Toms River, NJ
  • From Digital Man@VERT to Bill McGarrity on Thu Feb 9 15:45:13 2017
    Re: hash script for crontab..
    By: Bill McGarrity to All on Thu Feb 09 2017 03:06 am

    OK.. just little ole me again with a question....

    Here is a bash script I put together to post a message in a general area...

    ==== Start

    #!/bin/bash



    cd /home/pi/sbbs/exec



    rm -r /home/pi/sbbs/exec/daystats.txt

    rm -r /home/pi/sbbs/exec/daygraph.txt



    cd /home/pi/binkd-1.1



    perl binkdstat-wk42.pl -s -l binkd.log -p -1 +1 > /home/pi/sbbs/exec/daystats.txt

    perl binkdstat-wk42.pl -l binkd.log -p -1 +1 -G -1 > /home/pi/sbbs/exec/daygraph.txt



    chmod 777 /home/pi/sbbs/exec/daystats.txt

    chmod 777 /home/pi/sbbs/exec/daygraph.txt



    cd /home/pi/sbbs/exec



    ./smbutil -fSportNetHub -tAll -sBink_Daily_Graph -i /home/pi/sbbs/exec/daygraph.txt /home/pi/sbbs/data/subs/1generals.shd


    ./smbutil -fSportNetHub -tAll -sBinkD_Daily_Stats -i /home/pi/sbbs/exec/daystats.txt /home/pi/sbbs/data/subs/1generals.shd



    ./sbbsecho -LINF > /home/pi/sbbs/events/outerror.log


    ===== End

    I run the above script as a SU and this is the result.

    ===== Start

    (there is a significant amout of 'chatter' before this but it really wasn't needed)

    Maintaining /home/pi/sbbs/data/subs/1generals

    Maintaining /home/pi/sbbs/data/subs/1generals hash file

    Loading index...

    2 of 2

    Done.



    Scanning for pre-flagged messages...

    100% (0 pre-flagged for deletion)

    Scanning for read messages to be killed...

    100% (0 flagged for deletion due to read status)



    !Error 2 opening home/pi/sbbs/exec/daystats.txt

    Is that a typo or is the initial / (before home) actually missing?

    Now from what you can see in the 'script', I use chmod to allow anyone the ability to do whatever they deemed fit with it, yet... why does smbutil have an issue opening the file?

    My guess: the missing slash.

    digital man

    Synchronet/BBS Terminology Definition #20:
    FDSZ = FOSSIL DSZ (by Chuck Forsberg)
    Norco, CA WX: 73.6F, 62.0% humidity, 8 mph ESE wind, 0.01 inches rain/24hrs

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Accession@VERT/PHARCYDE to Bill McGarrity on Thu Feb 9 17:43:06 2017
    Hello Bill,

    On Thu Feb 09 2017 03:06:00, Bill McGarrity wrote to All:

    Here is a bash script I put together to post a message in a general area...

    ==== Start

    #!/bin/bash

    cd /home/pi/sbbs/exec

    rm -r /home/pi/sbbs/exec/daystats.txt

    rm -r /home/pi/sbbs/exec/daygraph.txt

    cd /home/pi/binkd-1.1

    perl binkdstat-wk42.pl -s -l binkd.log -p -1 +1 > /home/pi/sbbs/exec/daystats.txt

    perl binkdstat-wk42.pl -l binkd.log -p -1 +1 -G -1 > /home/pi/sbbs/exec/daygraph.txt

    chmod 777 /home/pi/sbbs/exec/daystats.txt

    chmod 777 /home/pi/sbbs/exec/daygraph.txt

    cd /home/pi/sbbs/exec

    ./smbutil -fSportNetHub -tAll -sBink_Daily_Graph -i /home/pi/sbbs/exec/daygraph.txt /home/pi/sbbs/data/subs/1generals.shd

    It looks like here you have a space between -i and the path to daygraph.txt. There shouldn't be one.

    Also, I believe you can use regular spacing as long as you use quotes (ie: -s"BinkD Daily Graph").

    ./smbutil -fSportNetHub -tAll -sBinkD_Daily_Stats -i /home/pi/sbbs/exec/daystats.txt /home/pi/sbbs/data/subs/1generals.shd

    Same with the above.

    ./sbbsecho -LINF > /home/pi/sbbs/events/outerror.log

    !Error 2 opening home/pi/sbbs/exec/daystats.txt
    Returning error code: 1

    Notice in the error above there is no "/" before "home". This is most likely because there is a space between the option and the path to the text file you wish to import.

    Regards,
    Nick

    ... "Не знаю. Я здесь только работаю."
    --- GoldED+/LNX 1.1.5-b20161221
    * Origin: thePharcyde_ distribution system (Wisconsin) (723:1/1)
    Synchronet thePharcyde_ telnet://bbs.pharcyde.org (Wisconsin)
  • From Bill McGarrity@VERT/TEQUILAM to Digital Man on Fri Feb 10 01:29:00 2017
    Digital Man wrote to Bill McGarrity <=-

    Re: hash script for crontab..
    By: Bill McGarrity to All on Thu Feb 09 2017 03:06 am

    OK.. just little ole me again with a question....

    Here is a bash script I put together to post a message in a general area...

    ==== Start

    #!/bin/bash



    cd /home/pi/sbbs/exec



    rm -r /home/pi/sbbs/exec/daystats.txt

    rm -r /home/pi/sbbs/exec/daygraph.txt



    cd /home/pi/binkd-1.1



    perl binkdstat-wk42.pl -s -l binkd.log -p -1 +1 > /home/pi/sbbs/exec/daystats.txt

    perl binkdstat-wk42.pl -l binkd.log -p -1 +1 -G -1 > /home/pi/sbbs/exec/daygraph.txt



    chmod 777 /home/pi/sbbs/exec/daystats.txt

    chmod 777 /home/pi/sbbs/exec/daygraph.txt



    cd /home/pi/sbbs/exec



    ./smbutil -fSportNetHub -tAll -sBink_Daily_Graph -i /home/pi/sbbs/exec/daygraph.txt /home/pi/sbbs/data/subs/1generals.shd


    ./smbutil -fSportNetHub -tAll -sBinkD_Daily_Stats -i /home/pi/sbbs/exec/daystats.txt /home/pi/sbbs/data/subs/1generals.shd



    ./sbbsecho -LINF > /home/pi/sbbs/events/outerror.log


    ===== End

    I run the above script as a SU and this is the result.

    ===== Start

    (there is a significant amout of 'chatter' before this but it really wasn't needed)

    Maintaining /home/pi/sbbs/data/subs/1generals

    Maintaining /home/pi/sbbs/data/subs/1generals hash file

    Loading index...

    2 of 2

    Done.



    Scanning for pre-flagged messages...

    100% (0 pre-flagged for deletion)

    Scanning for read messages to be killed...

    100% (0 flagged for deletion due to read status)



    !Error 2 opening home/pi/sbbs/exec/daystats.txt

    Is that a typo or is the initial / (before home) actually missing?


    Nope, not a typo, I c&p'd directly. There was no / before home.

    Now from what you can see in the 'script', I use chmod to allow anyone the ability to do whatever they deemed fit with it, yet... why does smbutil have an issue opening the file?

    My guess: the missing slash.

    I would say so also but no where in the script did I miss putting the full path including the beginning /.


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net:81
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    --- MultiMail/Win32 v0.50
    Synchronet TequilaMockingbird Online - Toms River, NJ
  • From Bill McGarrity@VERT/TEQUILAM to Accession on Fri Feb 10 01:45:00 2017
    Hiya Nick..

    Accession wrote to Bill McGarrity <=-


    On Thu Feb 09 2017 03:06:00, Bill McGarrity wrote to All:

    Here is a bash script I put together to post a message in a general area...

    ==== Start

    #!/bin/bash

    cd /home/pi/sbbs/exec

    rm -r /home/pi/sbbs/exec/daystats.txt

    rm -r /home/pi/sbbs/exec/daygraph.txt

    cd /home/pi/binkd-1.1

    perl binkdstat-wk42.pl -s -l binkd.log -p -1 +1 > /home/pi/sbbs/exec/daystats.txt

    perl binkdstat-wk42.pl -l binkd.log -p -1 +1 -G -1 > /home/pi/sbbs/exec/daygraph.txt

    chmod 777 /home/pi/sbbs/exec/daystats.txt

    chmod 777 /home/pi/sbbs/exec/daygraph.txt

    cd /home/pi/sbbs/exec

    ./smbutil -fSportNetHub -tAll -sBink_Daily_Graph -i /home/pi/sbbs/exec/daygraph.txt /home/pi/sbbs/data/subs/1generals.shd

    It looks like here you have a space between -i and the path to daygraph.txt. There shouldn't be one.

    If I remove the space after the -i I get a: Unknown opt '/'
    If I remove the / and the space after the -i I get: Umknown opt 'h'
    If I leave the space and remove the / after the -i I get: !Error 2 opening ome/pi/sbbs/exec/daystats.txt

    (Notice it always seems to remove the first character after the -i


    Also, I believe you can use regular spacing as long as you use quotes
    (ie: -s"BinkD Daily Graph").

    Done. Once I get the other stuff working hopefull that will take care of the _ issue.


    ./smbutil -fSportNetHub -tAll -sBinkD_Daily_Stats -i /home/pi/sbbs/exec/daystats.txt /home/pi/sbbs/data/subs/1generals.shd

    Same with the above.

    ./sbbsecho -LINF > /home/pi/sbbs/events/outerror.log

    !Error 2 opening home/pi/sbbs/exec/daystats.txt
    Returning error code: 1

    Notice in the error above there is no "/" before "home". This is most likely because there is a space between the option and the path to the text file you wish to import.

    Nope, as explained above... :/


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net:81
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    --- MultiMail/Win32 v0.50
    Synchronet TequilaMockingbird Online - Toms River, NJ
  • From Accession@VERT/PHARCYDE to Bill McGarrity on Fri Feb 10 07:25:24 2017
    Hello Bill,

    On Fri Feb 10 2017 01:45:00, Bill McGarrity wrote to Accession:

    ./smbutil -fSportNetHub -tAll -sBink_Daily_Graph -i
    /home/pi/sbbs/exec/daygraph.txt
    /home/pi/sbbs/data/subs/1generals.shd

    It looks like here you have a space between -i and the path to
    daygraph.txt. There shouldn't be one.

    If I remove the space after the -i I get a: Unknown opt '/'
    If I remove the / and the space after the -i I get: Umknown opt 'h'
    If I leave the space and remove the / after the -i I get: !Error 2
    opening ome/pi/sbbs/exec/daystats.txt

    (Notice it always seems to remove the first character after the -i

    Aha. Figured it out. While "-f", "-t", and "-s" are all options that should be started with a "-", "i" is a command, and should not be. Here is one of my scripts to import a text file:

    #!/bin/bash

    export SBBSCTRL=/sbbs/ctrl

    /sbbs/exec/smbutil i/sbbs/text/phar_ad.asc /sbbs/data/subs/dove-ads.shd < /sbbs/mods/hdr/phar_ad.hdr

    Take out the hyphen before "i" as well as the space, and you should be good to go.

    Also, I believe you can use regular spacing as long as you use
    quotes (ie: -s"BinkD Daily Graph").

    Done. Once I get the other stuff working hopefull that will take care
    of the _ issue.

    Also, as you can see above, I use a header to fill in the option fields. The "phar_ad.hdr" only contains three lines:

    TO
    FROM
    SUBJECT

    So you don't need to add that to the command line if you do something like what
    I do above. That's completely optional, though.

    Regards,
    Nick

    ... "Не знаю. Я здесь только работаю."
    --- GoldED+/LNX 1.1.5-b20161221
    * Origin: thePharcyde_ distribution system (Wisconsin) (723:1/1)
    Synchronet thePharcyde_ telnet://bbs.pharcyde.org (Wisconsin)
  • From Bill McGarrity@VERT/TEQUILAM to Accession on Fri Feb 10 13:40:00 2017
    Hiya Nick...

    Accession wrote to Bill McGarrity <=-


    On Fri Feb 10 2017 01:45:00, Bill McGarrity wrote to Accession:

    Aha. Figured it out. While "-f", "-t", and "-s" are all options that should be started with a "-", "i" is a command, and should not be. Here
    is one of my scripts to import a text file:

    #!/bin/bash

    export SBBSCTRL=/sbbs/ctrl

    /sbbs/exec/smbutil i/sbbs/text/phar_ad.asc /sbbs/data/subs/dove-ads.shd
    < /sbbs/mods/hdr/phar_ad.hdr

    Take out the hyphen before "i" as well as the space, and you should be good to go.


    That was it!! I thought I copied over exactly how I have it on the 'Doze box... <shaking head> But I am getting better making up these bash scripts... ;)

    Also, I believe you can use regular spacing as long as you use
    quotes (ie: -s"BinkD Daily Graph").

    Done. Once I get the other stuff working hopefull that will take care
    of the _ issue.

    Also, as you can see above, I use a header to fill in the option
    fields. The "phar_ad.hdr" only contains three lines:

    I did that in the beginning as well but probably because of the '-' in front of the i it was giving me trouble so I went the long way. It works... so I had to type a few more keystrokes.. lol!!


    So you don't need to add that to the command line if you do something
    like what I do above. That's completely optional, though.

    Yup... one thing I had to do is change permissons on the 1generals.* files in the sub but as I said, it's working... and all is good in Mudville...

    Thanks so much Nick!!


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net:81
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    --- MultiMail/Win32 v0.50
    Synchronet TequilaMockingbird Online - Toms River, NJ