How do you expect Node2 to notice that Node1 has died and that it should offer the service IP address? HA will have a heartbeat as a requirement, and most likely there will be one set based on boot network connections and another set based on shared disk. These are internal to HA and not your own scripts.
I've only got experience with AIX HA, but the process must be similar, so you define resources (in this case the service IP address) and use HA to make that available on one or other node as appropriate.
Thanks for your comment.
As here requirement was little bit different.So I got it working after some modification in slapd script.
and adding one ip as resource.