How to start LDAP service in linux using ANT task

0

In linux, I am able to start LDAP serice like this

sudo /etc/init.d/ldap start

now I want to do this using ANT:

<target name="ldap-service-start" description="Start LDAP service">
          <exec executable="ldap" osfamily="unix" dir="/etc/init.d">
           <arg line="start"/>
          </exec> 
</target>

but it failed when running ANT:

Execute failed: java.io.IOException: Cannot run program "ldap" (in directory "/etc/init.d"): error=2, No such file or directory

what is wrong with my ANT script?

Thanks

Victor

Posted 2016-07-08T19:33:42.377

Reputation: 153

Answers

0

ended up with a solution myself:

<target name="ldap-service-start" description="Start LDAP service">
      <exec executable="/etc/init.d/ldap" osfamily="unix">
       <arg line="start"/>
      </exec> 
</target>

Victor

Posted 2016-07-08T19:33:42.377

Reputation: 153