Thread View: alt.privacy.anon-server
9 messages
9 total messages
Started by Red John
Thu, 24 Jul 2014 20:48
Crontab Email Error Message
Author: Red John
Date: Thu, 24 Jul 2014 20:48
Date: Thu, 24 Jul 2014 20:48
36 lines
1969 bytes
1969 bytes
When I implement the cron jobs below I get these email messages everytime the job is executed: Here's the email: No LSB modules are available. GenuineIntel GenuineIntel Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz Linux 2.6.32-042stab090.5 i686 Distributor ID: Debian Description: Debian GNU/Linux 7.5 (wheezy) Release: 7.5 Codename: wheezy /etc/Servstats/lstats.sh: 1: /etc/Servstats/lstats.sh: Bad substitution /etc/Servstats/lstats.sh: 1: /etc/Servstats/lstats.sh: Bad substitution /etc/Servstats/lstats.sh: 87: /etc/Servstats/lstats.sh: Syntax error: +redirection unexpected Here's the crontab entries: # Retrieve stastics for server web page - cron job */15 5-20 * * * /etc/Servstats/lstats.sh redjohn 00 00 * * * /etc/Servstats/lstats.sh redjohn # Total pool processed today - cron job */5 * * * * /etc/Servstats/poolcount.sh Can someone explain what's wrong with the entries in my crontab that would be causing the emails above? Right now I have the crontab entries pounded out, which means my stats are not being updated unless I do it manually.
Re: Crontab Email Error Message
Author: elvis-85503
Date: Thu, 24 Jul 2014 21:37
Date: Thu, 24 Jul 2014 21:37
12 lines
1447 bytes
1447 bytes
On 2014-07-24, Red John <redjohn@nym.mixmin.net> wrote: > When I implement the cron jobs below I get these email messages > everytime the job is executed: > /etc/Servstats/lstats.sh: 1: /etc/Servstats/lstats.sh: Bad > substitution > /etc/Servstats/lstats.sh: 1: /etc/Servstats/lstats.sh: Bad > substitution > /etc/Servstats/lstats.sh: 87: /etc/Servstats/lstats.sh: Syntax > error: show us od -c /etc/Servstats/lstats.sh
Re: Crontab Email Error Message
Author: Dave U. Random
Date: Thu, 24 Jul 2014 22:13
Date: Thu, 24 Jul 2014 22:13
4 lines
1069 bytes
1069 bytes
The page that has the script code also contains installation instructions at the top. Your problem sounds like you copied those instructions into the lstats.sh file also.
Re: Crontab Email Error Message
Author: Red John
Date: Thu, 24 Jul 2014 22:37
Date: Thu, 24 Jul 2014 22:37
10 lines
1368 bytes
1368 bytes
On 7/24/2014 3:13 PM, Dave U. Random wrote:> The page that has the script code also contains installation > instructions at the top. Your problem sounds like you copied those > instructions into the lstats.sh file also. > That's exactly what I did. The instructions were pounded out, so why does this cause a problem? I have removed those instructions and will report back on the status of the crontab emails.
Re: Crontab Email Error Message
Author: Red John
Date: Thu, 24 Jul 2014 23:29
Date: Thu, 24 Jul 2014 23:29
47 lines
2725 bytes
2725 bytes
On 7/24/2014 2:37 PM, elvis-85503@notatla.org.uk wrote:>> >
/etc/Servstats/lstats.sh: 1: /etc/Servstats/lstats.sh: Bad
>> > substitution
>> > /etc/Servstats/lstats.sh: 1: /etc/Servstats/lstats.sh: Bad
>> > substitution
>> > /etc/Servstats/lstats.sh: 87: /etc/Servstats/lstats.sh:
Syntax
>> > error:
> show us od -c /etc/Servstats/lstats.sh
elvis the amount of output from the command above is way too
much to post in a reply. How would you recommend that I get you
a link so you can see the entire contents. I have outputted the
contents to a text file and can upload it to dropbox, if that
would work.
Here's a sample of what I got:
[redjohn:/etc/Servstats] root$ od -c /etc/Servstats/lstats.sh
0000000 # - - - l s t a t s . s h
b e
0000020 g i n - - - - - - - - - - -
- -
0000040 - - - - - - - - - - - - - -
- -
*
0000100 - - - - - - - - - # \n \t \t \t
0000120 \n # - - - - - - - - - - - -
- -
0000140 - - - - - - - - - - - - - -
- -
*
0000220 - - - - - - - - - - # \n #
0000240 - - -
S
0000260 e r v e r s t a t i s t i
c s
0000300 w e b p a g e b u i l
d e
0000320 r - - -
0000340 # \n # E x a m p
l e
0000360 p a g e : i n w t x . n
e t
0000400 / s e r v s t a t s . h t m
l
Re: Crontab Email Error Message
Author: elvis-85503
Date: Thu, 24 Jul 2014 23:53
Date: Thu, 24 Jul 2014 23:53
12 lines
1574 bytes
1574 bytes
>> show us od -c /etc/Servstats/lstats.sh > > elvis the amount of output from the command above is way too > much to post in a reply. How would you recommend that I get you > a link so you can see the entire contents. I have outputted the > contents to a text file and can upload it to dropbox, if that > would work. That's enough to show you have correct unix-style line endings lack of which is something that can derail scripts. We look forward to your next cron results.
Re: Crontab Email Error Message
Author: Anonymous Remailer (austria)
Date: Fri, 25 Jul 2014 00:14
Date: Fri, 25 Jul 2014 00:14
6 lines
1157 bytes
1157 bytes
Those messages are not being caused by cron, but by some kind of error happening in lstats.sh. Download the code again and redo the .sh files again. Or try to figure out what is wrong with instruction 1 and 87.
Re: Crontab Email Error Message
Author: Anonymous Remailer (austria)
Date: Fri, 25 Jul 2014 00:20
Date: Fri, 25 Jul 2014 00:20
15 lines
1535 bytes
1535 bytes
> On 7/24/2014 3:13 PM, Dave U. Random wrote:> The page that has > the script code also contains installation > instructions at the top. Your problem sounds like you copied those > instructions into the lstats.sh file also. > That's exactly what I did. The instructions were pounded out, so > why does this cause a problem? I have removed those instructions > and will report back on the status of the crontab emails. The instructions that are at the very top of the page are not delimiters. Those are the ones I am talking about.
Re: Crontab Email Error Message
Author: Red John
Date: Fri, 25 Jul 2014 02:04
Date: Fri, 25 Jul 2014 02:04
21 lines
1843 bytes
1843 bytes
On 7/24/2014 4:53 PM, elvis-85503@notatla.org.uk wrote:>>> show us od -c /etc/Servstats/lstats.sh >> >> elvis the amount of output from the command above is way too >> much to post in a reply. How would you recommend that I get you >> a link so you can see the entire contents. I have outputted the >> contents to a text file and can upload it to dropbox, if that >> would work. > > That's enough to show you have correct unix-style line endings > lack of which is something that can derail scripts. > > We look forward to your next cron results. > I updated my page to the latest code from inwtx' page and I'm good to go. The original problem I had was with the instruction code at the top of the scripts not being deleted. Everything is good to go now. No issues with Cron.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads