Date: Tue, 05 Jan 2010 09:51:51 +0200 From: Yevgen Krapiva <ykrapiva@gmail.com> To: freebsd-rc@freebsd.org Subject: Need help with shutdowning a java process Message-ID: <1262677911.2694.11.camel@kv-po-ykrapivanb.umc.com.ua>
next in thread | raw e-mail | index | archive | help
Hi all, I have the following rc script: .. name="openjsip_location_service" .. # Execution command runcmd="java -cp $CLASSPATH -Djava.security.policy=conf/policy.all -Djava.rmi.server.codebase=\"file://$OPENJSIP_REMOTE_LIB file://$JAIN_SIP_API_LIB\" openjsip.locationservice.LocationService conf/location-service.properties" pidfile="/var/run/${name}.pid" command="/usr/sbin/daemon" flags="-p ${pidfile} $runcmd" # When I run java from /usr/local/bin I run javavm indeed (convenient wrapper for switching Java VMs). # So I need to get the correct processname from output of 'ps' command # Subvert the check_pidfile procname check. if [ -f $pidfile ]; then read rc_pid junk < $pidfile if [ ! -z "$rc_pid" ]; then procname=`ps -o command= $rc_pid` echo rc_pid=$rc_pid echo procname=$procname fi fi run_rc_command "$1" The service starts well but I can't check the status or shutdown it. root@etc/rc.d #./openjsip-location-service onestatus rc_pid=34459 procname=/usr/local/diablo-jdk1.6.0/bin/java -cp :/usr/local/share/openjsip/lib/jain-sdp-1.0.115.jar:/usr/local/share/openjsip/lib/jain-sip-api-1.2.jar:/usr/local/share/openjsip/lib/jai ./openjsip-location-service: WARNING: no shebang line in /usr/local/diablo-jdk1.6.0/bin/java openjsip_location_service is not running. What does it want from me saying that "./openjsip-location-service: WARNING: no shebang line in /usr/local/diablo-jdk1.6.0/bin/java" ? Can anybody help ?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1262677911.2694.11.camel>