I have attached a Redhat style init script for the distcc daemon.
Briefly tested on Redhat 9.

Thanks for a great program!

Karl


#!/bin/bash
#
# Init file for Distcc daemon 
#
# chkconfig: 2345 55 25
# description: Distcc daemon
#
# processname: distccd

# source function library
. /etc/rc.d/init.d/functions

# pull in sysconfig settings
[ -f /etc/sysconfig/sshd ] && . /etc/sysconfig/sshd

RETVAL=0
prog="distccd"
distccd=/usr/local/bin/distccd

start()
{
	echo -n $"Starting $prog:"
	daemon $distccd $OPTIONS
	RETVAL=$?
	[ "$RETVAL" = 0 ] && touch /var/lock/subsys/distccd
	echo
}

stop()
{
	echo -n $"Stopping $prog:"
	killproc $distccd
	RETVAL=$?
	[ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/distccd
	echo
}

reload()
{
	echo -n $"Reloading $prog:"
	killproc $distccd -HUP
	RETVAL=$?
	echo
}

case "$1" in
	start)
		start
		;;
	stop)
		stop
		;;
	restart)
		stop
		start
		;;
	reload)
		reload
		;;
	status)
		status $distccd
		RETVAL=$?
		;;
	*)
		echo $"Usage: $0 {start|stop|restart|reload|status}"
		RETVAL=1
esac
exit $RETVAL
__ 
distcc mailing list            http://distcc.samba.org/
To unsubscribe or change options: 
http://lists.samba.org/cgi-bin/mailman/listinfo/distcc

Reply via email to