-
hash script for crontab..
From
Bill McGarrity@VERT/TEQUILAM to
All on Thursday, February 09, 2017 03:06:00
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 Thursday, February 09, 2017 15:45:13
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 Thursday, February 09, 2017 17:43:06
Hello Bill,
On Thu Feb 09 2017 03:06:00, Bill McGarrity wrote to All:
BM> Here is a bash script I put together to post a message in a general
BM> area...
BM> ==== Start
BM> #!/bin/bash
BM> cd /home/pi/sbbs/exec
BM> rm -r /home/pi/sbbs/exec/daystats.txt
BM> rm -r /home/pi/sbbs/exec/daygraph.txt
BM> cd /home/pi/binkd-1.1
BM> perl binkdstat-wk42.pl -s -l binkd.log -p -1 +1 >
BM> /home/pi/sbbs/exec/daystats.txt
BM> perl binkdstat-wk42.pl -l binkd.log -p -1 +1 -G -1 >
BM> /home/pi/sbbs/exec/daygraph.txt
BM> chmod 777 /home/pi/sbbs/exec/daystats.txt
BM> chmod 777 /home/pi/sbbs/exec/daygraph.txt
BM> cd /home/pi/sbbs/exec
BM> ./smbutil -fSportNetHub -tAll -sBink_Daily_Graph -i
BM> /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").
BM> ./smbutil -fSportNetHub -tAll -sBinkD_Daily_Stats -i
BM> /home/pi/sbbs/exec/daystats.txt /home/pi/sbbs/data/subs/1generals.shd
Same with the above.
BM> ./sbbsecho -LINF > /home/pi/sbbs/events/outerror.log
BM> !Error 2 opening home/pi/sbbs/exec/daystats.txt
BM> 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 Friday, February 10, 2017 01:29:00
-=> Digital Man wrote to Bill McGarrity <=-
DM> Re: hash script for crontab..
DM> 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
DM> 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?
DM> 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 Friday, February 10, 2017 01:45:00
Hiya Nick..
-=> Accession wrote to Bill McGarrity <=-
Ac> On Thu Feb 09 2017 03:06:00, Bill McGarrity wrote to All:
BM> Here is a bash script I put together to post a message in a general
BM> area...
BM> ==== Start
BM> #!/bin/bash
BM> cd /home/pi/sbbs/exec
BM> rm -r /home/pi/sbbs/exec/daystats.txt
BM> rm -r /home/pi/sbbs/exec/daygraph.txt
BM> cd /home/pi/binkd-1.1
BM> perl binkdstat-wk42.pl -s -l binkd.log -p -1 +1 >
BM> /home/pi/sbbs/exec/daystats.txt
BM> perl binkdstat-wk42.pl -l binkd.log -p -1 +1 -G -1 >
BM> /home/pi/sbbs/exec/daygraph.txt
BM> chmod 777 /home/pi/sbbs/exec/daystats.txt
BM> chmod 777 /home/pi/sbbs/exec/daygraph.txt
BM> cd /home/pi/sbbs/exec
BM> ./smbutil -fSportNetHub -tAll -sBink_Daily_Graph -i
BM> /home/pi/sbbs/exec/daygraph.txt /home/pi/sbbs/data/subs/1generals.shd
Ac> It looks like here you have a space between -i and the path to
Ac> 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
Ac> Also, I believe you can use regular spacing as long as you use quotes
Ac> (ie: -s"BinkD Daily Graph").
Done. Once I get the other stuff working hopefull that will take care of the _
issue.
BM> ./smbutil -fSportNetHub -tAll -sBinkD_Daily_Stats -i
BM> /home/pi/sbbs/exec/daystats.txt /home/pi/sbbs/data/subs/1generals.shd
Ac> Same with the above.
BM> ./sbbsecho -LINF > /home/pi/sbbs/events/outerror.log
BM> !Error 2 opening home/pi/sbbs/exec/daystats.txt
BM> Returning error code: 1
Ac> Notice in the error above there is no "/" before "home". This is most
Ac> likely because there is a space between the option and the path to the
Ac> 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 Friday, February 10, 2017 07:25:24
Hello Bill,
On Fri Feb 10 2017 01:45:00, Bill McGarrity wrote to Accession:
BM>> ./smbutil -fSportNetHub -tAll -sBink_Daily_Graph -i
BM>> /home/pi/sbbs/exec/daygraph.txt
BM>> /home/pi/sbbs/data/subs/1generals.shd
Ac>> It looks like here you have a space between -i and the path to
Ac>> daygraph.txt. There shouldn't be one.
BM> If I remove the space after the -i I get a: Unknown opt '/'
BM> If I remove the / and the space after the -i I get: Umknown opt 'h'
BM> If I leave the space and remove the / after the -i I get: !Error 2
BM> opening ome/pi/sbbs/exec/daystats.txt
BM> (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.
Ac>> Also, I believe you can use regular spacing as long as you use
Ac>> quotes (ie: -s"BinkD Daily Graph").
BM> Done. Once I get the other stuff working hopefull that will take care
BM> 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 Friday, February 10, 2017 13:40:00
Hiya Nick...
-=> Accession wrote to Bill McGarrity <=-
Ac> On Fri Feb 10 2017 01:45:00, Bill McGarrity wrote to Accession:
Ac> Aha. Figured it out. While "-f", "-t", and "-s" are all options that
Ac> should be started with a "-", "i" is a command, and should not be. Here
Ac> is one of my scripts to import a text file:
Ac> #!/bin/bash
Ac> export SBBSCTRL=/sbbs/ctrl
Ac> /sbbs/exec/smbutil i/sbbs/text/phar_ad.asc /sbbs/data/subs/dove-ads.shd
Ac> < /sbbs/mods/hdr/phar_ad.hdr
Ac> Take out the hyphen before "i" as well as the space, and you should be
Ac> 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...
;)
Ac>> Also, I believe you can use regular spacing as long as you use
Ac>> quotes (ie: -s"BinkD Daily Graph").
BM> Done. Once I get the other stuff working hopefull that will take care
BM> of the _ issue.
Ac> Also, as you can see above, I use a header to fill in the option
Ac> 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!!
Ac> So you don't need to add that to the command line if you do something
Ac> 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