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

[LDM #ZUH-439769]: Problem with startup script.



Peter,

> address@hidden ~]$ more /etc/init.d/ldm
> #!/bin/sh
> #
> # Start LDM at boot time
> #
> # chkconfig: - 95 35
> # description: Starts and stops the ldm service
> LDMHOME=/home/ldm
> LDMBIN=/home/ldm/runtime/bin
> PATH=$PATH:$LDMBIN:$LDMHOME: export PATH
> 
> # Source function library.
> . /etc/rc.d/init.d/functions
> 
> # Source networking configuration.
> . /etc/sysconfig/network
> 
> # Check that networking is up.
> [ ${NETWORKING} = "no" ] && exit 0
> 
> [ -f $LDMBIN/ldmadmin ] || exit 0
> 
> RETVAL=0
> 
> # See how we were called.
> case "$1" in
> start)
> # Start daemons.
> echo -n "Starting ldm: "
> #daemon ldmadmin start
> /bin/su - ldm -c "$LDMBIN/ldmadmin stop"
> /bin/su - ldm -c "$LDMBIN/ldmadmin delqueue"
> /bin/su - ldm -c "$LDMBIN/ldmadmin mkqueue"
> /bin/su - ldm -c "$LDMBIN/ldmadmin start"
> #       /bin/su - ldm -c "$LDMBIN/pqing_bdds -s$RADAR -CBZIP2 $SERVERIP&"
> 
> RETVAL=$?
> echo
> [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ldm
> ;;
> stop)
> # Stop daemons.
> echo -n "Shutting down ldm: "
> #killproc ldm
> /bin/su - ldm -c "$LDMBIN/ldmadmin stop"
> RETVAL=$?
> echo
> [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ldm
> ;;
> status)
> #status ldm
> $LDMBIN/ldmadmin config ; $LDMBIN/ldmadmin ps
> RETVAL=$?
> ;;
> restart|reload)
> $0 stop
> $0 start
> RETVAL=$?
> ;;
> mkqueue)
> /bin/su - ldm -c "$LDMBIN/ldmadmin mkqueue"
> RETVAL=$?
> ;;
> delqueue)
> /bin/su - ldm -c "$LDMBIN/ldmadmin delqueue"
> RETVAL=$?
> ;;
> *)
> echo "Usage: ldm {start|stop|mkqueue|delqueue|restart|reload|status}"
> exit 1
> esac
> 
> exit $RETVAL

Your script differs considerably from our example script: 
<http://www.unidata.ucar.edu/software/ldm/ldm-current/basics/configuring.html#boot>
---so I'm not sure how much help I'll be.

I notice that the "/bin/su - ldm -c" prefix isn't used in the
"status" command.  Perhaps that's the cause of its problem.

I don't see any "if/then" constructions in your script, so I don't
see what could cause the problem with the "start" command.  Does
the command "ldmadmin start" work when executed by the LDM user?

> Peter Laws / N5UWY
> National Weather Center / Network Operations Center / Remote
> University of Oklahoma Information Technology
> address@hidden

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: ZUH-439769
Department: Support LDM
Priority: Normal
Status: On Hold


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.