#!/bin/sh # # setiathome This shell script takes care of starting and stopping # the setiathome client on a RedHat Linux system. # # Author: Matt Olson # Copyright 2003 Ocean Consulting # # This script is made available via the GNU General Public License. # No warrantees are implied as to any particular use or purpose. # # Read the GNU GPL at # http://www.fsf.org/copyleft/copyleft.html#translations # Source function library. . /etc/rc.d/init.d/functions [ -f /opt/seti/setiathome ] || exit 0 RETVAL=0 prog="setiathome" start() { # Start daemons. echo -n $"Starting $prog: " cd /opt/seti /opt/seti/setiathome -nice 19 -graphics > /dev/null 2> /dev/null & echo_success echo return $RETVAL } stop() { # Stop daemons. echo -n $"Shutting down $prog: " killproc setiathome RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/setiathome return $RETVAL } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart|reload) stop start RETVAL=$? ;; condrestart) if [ -f /var/lock/subsys/dhcpd ]; then stop start RETVAL=$? fi ;; status) status dhcpd RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|restart|condrestart|status}" exit 1 esac exit $RETVAL