/[packages]/cauldron/nss-pam-ldapd/current/SOURCES/nslcd.init
ViewVC logotype

Contents of /cauldron/nss-pam-ldapd/current/SOURCES/nslcd.init

Parent Directory Parent Directory | Revision Log Revision Log


Revision 203254 - (show annotations) (download)
Mon Jan 30 09:24:20 2012 UTC (8 years, 8 months ago) by guillomovitch
File size: 1629 byte(s)
imported package nss-pam-ldapd
1 #!/bin/sh
2 #
3 # chkconfig: - 12 88
4 # description: Provides naming services using a directory server.
5 # processname: /usr/sbin/nslcd
6 # config: /etc/nss-ldapd.conf
7 # pidfile: /var/run/nslcd/nslcd.pid
8 #
9
10 ### BEGIN INIT INFO
11 # Provides: nslcd
12 # Required-Start: $network
13 # Short-Description: naming services LDAP client daemon
14 # Description: Provides naming services using a directory server.
15 ### END INIT INFO
16
17 program=/usr/sbin/nslcd
18 prog=${program##*/}
19 pidfile=/var/run/nslcd/nslcd.pid
20
21 if [ -f /etc/rc.d/init.d/functions ]; then
22 . /etc/rc.d/init.d/functions
23 fi
24
25 RETVAL=0
26
27 start() {
28 echo -n $"Starting $prog: "
29 daemon $program
30 RETVAL=$?
31 echo
32 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
33 return $RETVAL
34 }
35
36 stop() {
37 echo -n $"Stopping $prog: "
38 killproc $program
39 RETVAL=$?
40 echo
41 if [ $RETVAL -eq 0 ]; then
42 rm -f /var/lock/subsys/$prog
43 fi
44 }
45
46 restart() {
47 stop
48 start
49 }
50
51 # See how we were called.
52 case "$1" in
53 start)
54 [ -f /var/lock/subsys/$prog ] && exit 0
55 $1
56 ;;
57 stop)
58 [ -f /var/lock/subsys/$prog ] || exit 0
59 $1
60 ;;
61 restart)
62 $1
63 ;;
64 status)
65 status -p $pidfile $program
66 RETVAL=$?
67 ;;
68 condrestart|try-restart)
69 [ -f /var/lock/subsys/$prog ] && restart || :
70 ;;
71 reload)
72 echo "can't reload configuration, you have to restart it"
73 RETVAL=3
74 ;;
75 force-reload)
76 restart
77 ;;
78 *)
79 echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
80 exit 1
81 ;;
82 esac
83 exit $RETVAL

  ViewVC Help
Powered by ViewVC 1.1.28