#!/bin/sh # # Starts distccd # # Make sure the distccd progam exists # (Should rather check the existence of a configuration file or something.) [ -f /usr/bin/distccd ] || exit 0 umask 077 start() { echo -n "Starting distcc: " start-stop-daemon --start --quiet --pidfile /var/run/distcc.pid --exec /usr/bin/distccd -- --user nobody --pid-file /var/run/distcc.pid echo "OK" } stop() { echo -n "Stopping distcc: " start-stop-daemon --stop --quiet --pidfile /var/run/distcc.pid echo "OK" } restart() { stop start } case "$1" in start) start ;; stop) stop ;; restart|reload) restart ;; *) echo $"Usage: $0 {start|stop|restart}" exit 1 esac exit $?