Pages: [1]   Go Down
Author Topic: Non initialised module  (Read 343 times)
0 Members and 1 Guest are viewing this topic.
Vitoi
Newbie
*

Karma: 0
Offline Offline

Posts: 2


View Profile
« on: July 19, 2011, 09:08:55 PM »

Script:
Code:
BUSCA=`ldapsearch -x -h $1 2> error`

if [ ${#BUSCA} = 0 ];
then
        echo 0
else
        echo 1
fi

This return 1 when LDAP is online and 0 when LDAP is offline... But when I try to load the module it doesn't initialize. Why?

I have a similar for checking DNS Server and it works just fine:
Code:
BUSCA=`nslookup $1 | grep $2`

if [ ${#BUSCA} = 0 ];
then
        echo 0
else
        echo 1
fi
Logged

daniels
Smart member
*****

Karma: 19
Offline Offline

Posts: 205



View Profile
« Reply #1 on: July 20, 2011, 02:56:44 PM »

Hi Vitoi.

  Check the output of your script. Most of the times, the "Non initialised" error is associated to the output of the check. Maybe the 'ldapsearch' call is taking too much to respond or a firewall is blocking the communication.

Regards.
Logged

daniels
Smart member
*****

Karma: 19
Offline Offline

Posts: 205



View Profile
« Reply #2 on: July 22, 2011, 02:48:07 PM »

Are you running the script in pandora server?
Logged

Vitoi
Newbie
*

Karma: 0
Offline Offline

Posts: 2


View Profile
« Reply #3 on: July 25, 2011, 06:30:16 PM »

Sorry, my bad...
Just had to add "sh " on the "Plug-in command"

/var/www/pandora_console/attachment/plugin/ldap.sh
to
sh /var/www/pandora_console/attachment/plugin/ldap.sh
Logged

daniels
Smart member
*****

Karma: 19
Offline Offline

Posts: 205



View Profile
« Reply #4 on: July 25, 2011, 07:40:38 PM »

I'm happy to know that you made it work.

Regards.
Logged

Pages: [1]   Go Up
Print
 
Jump to:  


SourceForge.net Logo  This site is monitored by Pandora FMS   ArticaST