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
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?
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
!Error 2 opening home/pi/sbbs/exec/daystats.txt
Returning error code: 1
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?
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.
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.
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.
./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.
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.
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:
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.
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,062 |
Nodes: | 17 (0 / 17) |
Uptime: | 26:33:22 |
Calls: | 501,399 |
Calls today: | 2 |
Files: | 109,432 |
D/L today: |
2,015 files (7,301M bytes) |
Messages: | 296,826 |