Mercurial > notdcc
annotate debian/dcc-server.init.diff @ 1:9b8d79ac0dc3
blindly adding debian patch for old version
author | Peter Gervai <grin@grin.hu> |
---|---|
date | Tue, 10 Mar 2009 14:25:08 +0100 |
parents | |
children |
rev | line source |
---|---|
1
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
1 --- dcc-1.2.74.orig/debian/dcc-server.init |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
2 +++ dcc-1.2.74/debian/dcc-server.init |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
3 @@ -0,0 +1,51 @@ |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
4 +#!/bin/sh |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
5 +# |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
6 +# dcc-server example file to build /etc/init.d/ scripts. |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
7 +# This file should be used to construct scripts for /etc/init.d. |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
8 + |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
9 +PATH=/sbin:/bin:/usr/sbin:/usr/bin |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
10 +DAEMON=/usr/sbin/dccd |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
11 +NAME=dcc-server |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
12 +DESC="Distributed Checksum Clearinghouse server" |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
13 + |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
14 +test -f $DAEMON || exit 0 |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
15 + |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
16 +if [ -f /etc/default/dcc-server ]; then |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
17 + . /etc/default/dcc-server |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
18 +else |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
19 + echo "Missing file /etc/default/dcc-server" |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
20 + exit 1 |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
21 +fi |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
22 + |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
23 +set -e |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
24 + |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
25 +case "$1" in |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
26 + start) |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
27 + echo -n "Starting $DESC: $NAME" |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
28 + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
29 + --chuid dcc:dcc --exec $DAEMON -- $OPTIONS |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
30 + echo "." |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
31 + ;; |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
32 + stop) |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
33 + echo -n "Stopping $DESC: $NAME" |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
34 + start-stop-daemon --oknodo --stop --quiet --exec $DAEMON |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
35 + echo "." |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
36 + ;; |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
37 + restart) |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
38 + echo -n "Restarting $DESC: $NAME" |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
39 + start-stop-daemon --stop --quiet --pidfile \ |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
40 + /var/run/$NAME.pid --exec $DAEMON |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
41 + sleep 1 |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
42 + start-stop-daemon --start --quiet --pidfile \ |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
43 + /var/run/$NAME.pid --exec $DAEMON -- $OPTIONS |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
44 + echo "." |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
45 + ;; |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
46 + *) |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
47 + N=/etc/init.d/$NAME |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
48 + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
49 + echo "Usage: $N {start|stop|restart}" >&2 |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
50 + exit 1 |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
51 + ;; |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
52 +esac |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
53 + |
9b8d79ac0dc3
blindly adding debian patch for old version
Peter Gervai <grin@grin.hu>
parents:
diff
changeset
|
54 +exit 0 |