Public bug reported:

Binary package hint: dcc-client

I used screen's SCREENDIR method with DCCDIR and updated the start and restart 
functions.
/etc/init.d/dcc-client follows:

#!/bin/sh
#
# dcc-client    example file to build /etc/init.d/ scripts.
#               This file should be used to construct scripts for /etc/init.d.

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/dccifd
NAME=dccifd
DESC="DCC program interface daemon"
DCCDIR=/var/run/dcc

test -f $DAEMON || exit 0

set -e

case "$1" in
  start)
        if [ ! -d $DCCDIR ]; then
                mkdir -p $DCCDIR
                chown dcc:dcc $DCCDIR
        fi
        echo -n "Starting $DESC: $NAME"
        start-stop-daemon --start --quiet --pidfile $DCCDIR/$NAME.pid \
                --chuid dcc:dcc --exec $DAEMON -- $OPTIONS
        echo "."
        ;;
  stop)
        echo -n "Stopping $DESC: $NAME"
        start-stop-daemon --oknodo --stop --quiet --exec $DAEMON
        echo "."
        ;;
  restart)
        echo -n "Restarting $DESC: $NAME"
        start-stop-daemon --stop --quiet --pidfile \
                $DCCDIR/$NAME.pid --exec $DAEMON
        sleep 1
        start-stop-daemon --start --quiet --pidfile \
                $DCCDIR/$NAME.pid --exec $DAEMON -- $OPTIONS
        echo "."
        echo "\n"
        ;;
  *)
        N=/etc/init.d/$NAME
        # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
        echo "Usage: $N {start|stop|restart}" >&2
        exit 1
        ;;
esac

exit 0

** Affects: dcc (Ubuntu)
     Importance: Undecided
         Status: Unconfirmed

-- 
dcc-client init fails to create pid file
https://launchpad.net/bugs/81619

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to