LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Linux HA and writing scripts to kill process (https://www.linuxquestions.org/questions/programming-9/linux-ha-and-writing-scripts-to-kill-process-347566/)

sceadu 07-28-2005 03:27 AM

Linux HA and writing scripts to kill process
 
Hi,
I have written a script to kill a particular process that is running a socket that binds to the virtual IP in a Linux HA setup.

This is what I wrote:
#!/bin/bash

. /etc/rc.d/init.d/functions

PROG = "Recieves_message_from_Virtual_IP"

start() {
daemon $PROG
}

stop() {
killproc $PROG
}
.....

I referenced the scripts in etc/rc.d/init.d and what I wrote is the same as those scripts. Linux HA has no problem starting the process "Recieves_message_from_Virtual_IP" during bootup using this script but when failsover accour, the process could not be killed using this script and Linux HA could not hand over the Virtual IP to the standby machine.

What could be the possible remedy for this problem?


All times are GMT -5. The time now is 10:53 AM.