#!/bin/sh # # chkconfig: 345 40 60 # description: Starts and stops the ices source client # Source function library. . /etc/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 NAME=ices BINARY=ices PROCESS=ices LOCKFILE=/var/lock/subsys/ices RETVAL=0 start() { export TMPDIR="/var/tmp" echo -n "Starting $NAME: " daemon --user ices $BINARY /etc/ices.conf RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $LOCKFILE } stop() { echo -n "Shutting down $NAME: " killproc $PROCESS RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f $LOCKFILE } case "$1" in start) start ;; stop) stop ;; restart|reload) stop start ;; status) status $PROCESS RETVAL=$? ;; condrestart) [ -f $LOCKFILE ] && restart ;; *) echo "Usage: $0 {start|stop|restart|status|condrestart}" RETVAL=1 esac exit $?