]> git.pld-linux.org Git - packages/glibc.git/blob - nscd.init
- updated to rc-scripts 0.2.0
[packages/glibc.git] / nscd.init
1 #!/bin/sh
2 #
3 # nscd:         Starts the Name Switch Cache Daemon
4 #
5 # chkconfig: 345 30 80
6 # description:  This is a daemon which handles passwd and group lookups \
7 #               for running programs and cache the results for the next \
8 #               query.  You should start this daemon only if you use \
9 #               slow Services like NIS or NIS+
10 # processname: nscd
11 # config: /etc/nscd.conf
12 #
13
14 # Sanity checks.
15 [ -f /etc/nscd.conf ] || exit 0
16 [ -x /usr/sbin/nscd ] || exit 0
17
18 # Source function library.
19 . /etc/rc.d/init.d/functions
20
21 # Get sysconfig
22 if [ -f /etc/sysconfig/nscd ]; then
23     . /etc/sysconfig/nscd
24 fi
25   
26 # See how we were called.
27 case "$1" in
28     start)
29         msg_sarting "Name Switch Cache Daemon"
30         daemon nscd $secure
31         touch /var/lock/subsys/nscd
32         ;;
33     stop)
34         msg_stopping "Name Switch Cache Daemon"
35         busy
36         /usr/sbin/nscd -K
37         rm -f /var/lock/subsys/nscd
38         deltext
39         ok
40         ;;
41   status)
42         status nscd
43         ;;
44   restart|reload)
45         $0 stop
46         $0 start
47         ;;
48     *)
49         msg_Usage "$0 {start|stop|status|restart|reload}"
50         ;;
51 esac
52 exit 0
This page took 0.068642 seconds and 4 git commands to generate.