#!/bin/sh # # dlife.rc This shell script takes care of starting and stopping # the dlife client. # # chkconfig: 2345 80 30 # description: The Distributed Artificial Life client. # processname: dlife_soup # config: /etc/dlife/soup.conf # Source function library. . /etc/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 [ -f /usr/bin/dlife_soup ] || exit 0 # See how we were called. case "$1" in start) # Start daemons. echo -n "Starting dlife: " daemon /usr/bin/dlife_soup echo ;; stop) # Stop daemons. echo -n "Shutting down dlife: " killproc dlife_soup echo ;; restart) $0 stop $0 start ;; status) status dlife_soup ;; *) echo "Usage: dlife.rc {start|stop|restart|status}" exit 1 esac exit 0