The architecture is:

root@CSMS-MontageTV:/mnt/vouchers# file /usr/bin/monit
/usr/bin/monit: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0x81d81460153852628b31609f8e20c458f3cf0197, stripped

I tried to change "#!/bin/bash" to "#!bin/sh"  and i'm getting this:

Program 'contego_errors'
  status                            Status ok
  monitoring status                 Monitored
  last started                      Thu, 20 Mar 2014 23:23:01
  last exit value                   0
  data collected                    Thu, 20 Mar 2014 23:23:01


It seems it is working ... Thanks a lot, you've got beer on me ;) Your ideas were more than helpfull ;)


Dne 20.3.2014 23:26, Martin Pala napsal(a):
Which binary architecture is the monit binary and which /bin/bash?:

file <path>/monit
file /bin/bash


Can you try to change "#!/bin/bash" to "#!/bin/sh" in the script?


Regards,
Martin



On 20 Mar 2014, at 23:17, Martin Vaner <[email protected] <mailto:[email protected]>> wrote:

Hi Martin,

root@CSMS-MontageTV:/usr/local/bin# ls -l /bin/bash
-rwxr-xr-x 1 root root 975488 Dec 30  2012 /bin/bash
root@CSMS-MontageTV:/usr/local/bin#

It is exit. So, when i run the script from the console, i just getting this output:

root@CSMS-MontageTV:/mnt/vouchers# bash -x logtest.sh
++ tail -n 10 contego.log
++ grep Error
++ wc -l
+ errorcount=0
+ '[' 0 -gt 0 ']'
+ echo 0
0
+ exit 0
root@CSMS-MontageTV:/mnt/vouchers#

If i run the script form the console directly, it is working fine.

I do not understand, I have 18 servers all around the world and i am getting the same error from all of them. There is only one little difference between systems - something are Debian and something are OpenSuse ....

Martin

Dne 20.3.2014 23:03, Martin Pala napsal(a):
ls -l /bin/bash

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general



--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to