redhat clustersuite problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have 2 dell servers with clustersuite installed. I can run xclock as
cluster service. However I got a problem running a particular service
called gw. It is a server listening to a certain port.
The script called by the cluster service is main.sh

The problem is I can run main.sh by calling "./main.sh start"
manually. However, when I try running the service from the cluster (by
enabling the service), the service says started in the cluster but
when I check from the console, it does not actually start.

Thanks for your help.

Here is the script for main.sh
==============================================
#! /bin/bash
#
# xclock          Start/Stop the clock.
#
# chkconfig: 2345 90 60
# description: xclock
# processname: xclock
# pidfile: /var/run/xclock.pid

# Source function library.
. /etc/init.d/functions

RETVAL=0

# See how we were called.

prog="gw"
# echo "node2" > /mnt/hdd/shared

start() {
        echo -n $"Starting $prog: "
       /apps/gw -d DEBUG > /dev/null&
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gw
        return $RETVAL
}

stop() {
        echo -n $"Stopping $prog: "
        killproc gw
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/gw
        return $RETVAL
}

rhstatus() {
        status gw
}

restart() {
        stop
        start
}

reload() {
        echo -n $"Reloading clock daemon configuration: "
        killproc gw -HUP
        retval=$?
        echo
        return $RETVAL

}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  reload)
        reload
        ;;
  status)
        rhstatus
        ;;
  condrestart)
        [ -f /var/lock/subsys/gw ] && restart || :
        ;;
  *)
        echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
        exit 1
esac

exit $?


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux