Revision 653715aa
b/debian/default | ||
---|---|---|
1 |
# set uid/gid |
|
2 |
#CHUID="nobody:nogroup" |
b/debian/init.d | ||
---|---|---|
16 | 16 |
DAEMON=/usr/sbin/vncauthproxy |
17 | 17 |
NAME="vncauthproxy" |
18 | 18 |
DESC="VNC authentication proxy" |
19 |
PIDFILE=/var/run/$NAME/$NAME.pid |
|
19 |
RUNDIR=/var/run/$NAME |
|
20 |
LOGDIR=/var/log/$NAME |
|
21 |
PIDFILE=$RUNDIR/$NAME.pid |
|
22 |
CHUID="nobody:nogroup" |
|
20 | 23 |
|
21 | 24 |
. /lib/lsb/init-functions |
22 | 25 |
|
... | ... | |
24 | 27 |
|
25 | 28 |
DAEMON_OPTS="--pid-file=$PIDFILE" |
26 | 29 |
|
30 |
# Read configuration variable file if it is present |
|
31 |
[ -r /etc/default/$NAME ] && . /etc/default/$NAME |
|
32 |
|
|
27 | 33 |
case "$1" in |
28 | 34 |
start) |
35 |
mkdir -p $RUNDIR |
|
36 |
chown $CHUID $RUNDIR $LOGDIR |
|
37 |
chmod 0755 $RUNDIR $LOGDIR |
|
38 |
|
|
29 | 39 |
if pidofproc -p $PIDFILE $DAEMON > /dev/null; then |
30 | 40 |
log_failure_msg "Starting $DESC (already started)" |
31 | 41 |
exit 0 |
32 | 42 |
fi |
33 | 43 |
log_daemon_msg "Starting $DESC" "$NAME" |
34 | 44 |
start-stop-daemon --start --quiet --pidfile $PIDFILE \ |
45 |
--chuid $CHUID \ |
|
35 | 46 |
--exec $DAEMON -- $DAEMON_OPTS |
36 | 47 |
log_end_msg $? |
37 | 48 |
;; |
Also available in: Unified diff