File: cvsd.init.redhat71.in

package info (click to toggle)
cvsd 1.0.24
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, jessie, jessie-kfreebsd, sid, stretch, trixie, wheezy
  • size: 1,180 kB
  • sloc: sh: 5,075; ansic: 1,860; perl: 198; makefile: 88
file content (61 lines) | stat: -rw-r--r-- 1,558 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh

# chkconfig: 345 96 04
# description: cvsd is a wrapper program for cvs in pserver mode. it \
# will run 'cvs pserver' under a special uid/gid in a chroot jail.

# /etc/init.d/cvsd script for starting cvsd
# Copyright (C) 2002, 2003, 2004 Arthur de Jong
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

. /etc/rc.d/init.d/functions

CVSD_BIN=@CVSD_BIN@
DESC="cvs pserver chroot wrapper"
CVSD_CFG=@CONFIGFILE@

[ -x "$CVSD_BIN" ] || exit 0
[ -f "$CVSD_CFG" ] || exit 0

PIDFILE=`sed -n 's/^ *PidFile *\([^ ]*\) *$/\1/p' < $CVSD_CFG`

case "$1" in
start)
  echo -n "Starting $DESC: cvsd"
  daemon $CVSD_BIN -f $CVSD_CFG
  echo
  ;;
stop)
  echo -n "Stopping $DESC: cvsd"
  killproc $CVSD_BIN
  echo
  [ -n "$PIDFILE" ] && rm -f $PIDFILE
  ;;
restart)
  $0 stop
  sleep 2
  $0 start
  ;;
status)
  status $CVSD_BIN
  ;;
*)
  echo "Usage: $0 {start|stop|restart|status}"
  exit 1
  ;;
esac

exit 0