#!/bin/sh # # Startup script for the ARM4 daemon # # Copyright (c) 2005-2008 David Carter <dcarter@arm4.org> and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at # http://www.eclipse.org/legal/epl-v10.html # # chkconfig: - 85 15 # description: ARM 4 application response measurement agent # processname: arm4_daemon # pidfile: /var/run/arm4.pid # Source function library. . /etc/rc.d/init.d/functions arm4=/usr/bin/arm4_daemon RETVAL=0 case "$1" in start) echo -n "Starting arm4: " daemon $arm4 RETVAL=$? echo [ $RETVAL = 0 ] && touch /var/lock/subsys/arm4 ;; stop) echo -n "Shutting down arm4: " killproc $arm4 RETVAL=$? echo [ $RETVAL = 0 ] && rm -f /var/lock/subsys/arm4 [ $RETVAL = 0 ] && rm -f /var/run/arm4.pid ;; status) status $arm4 RETVAL=$? ;; reload) # Same as restart $0 stop $0 start ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|reload|restart|status}" exit 1 esac exit $RETVAL