s4:librpc: ask for GENSEC_FEATURE_SIGN_PKT_HEADER after the gensec_update() dance
[Samba.git] / packaging / RHEL-CTDB / setup / winbind.init
blob2a9dd821ca98744032f34d2d4d9b1c5a95c6a750
1 #!/bin/sh
3 # chkconfig: - 91 35
4 # description: Starts and stops the Samba winbind daemon
5 # #
6 # pidfile: /var/cache/samba/winbind.pid
7 # config: /etc/samba/smb.conf
10 # Source function library.
11 if [ -f /etc/init.d/functions ] ; then
12 . /etc/init.d/functions
13 elif [ -f /etc/rc.d/init.d/functions ] ; then
14 . /etc/rc.d/init.d/functions
15 else
16 exit 0
19 DAEMON_COREFILE_LIMIT='unlimited'
21 # Avoid using root's TMPDIR
22 unset TMPDIR
24 # Source networking configuration.
25 . /etc/sysconfig/network
27 if [ -f /etc/sysconfig/samba ]; then
28 . /etc/sysconfig/samba
31 # Check that networking is up.
32 [ ${NETWORKING} = "no" ] && exit 0
34 # Check that smb.conf exists.
35 [ -f /etc/samba/smb.conf ] || exit 0
37 RETVAL=0
40 start() {
41 KIND="Winbind"
42 echo -n $"Starting $KIND services: "
43 daemon winbindd "$WINBINDOPTIONS"
44 RETVAL=$?
45 echo
46 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/winbindd || RETVAL=1
47 return $RETVAL
50 stop() {
51 echo
52 KIND="Winbind"
53 echo -n $"Shutting down $KIND services: "
54 killproc winbindd
55 RETVAL=$?
56 [ $RETVAL -eq 0 ] && rm -f /var/run/winbindd.pid && rm -f /var/lock/subsys/winbindd
57 echo ""
58 return $RETVAL
61 restart() {
62 stop
63 start
66 reload() {
67 echo -n $"Reloading smb.conf file: "
68 killproc winbindd -HUP
69 RETVAL=$?
70 echo
71 return $RETVAL
74 rhstatus() {
75 status winbindd
78 case "$1" in
79 start)
80 start
82 stop)
83 stop
85 restart)
86 restart
88 reload)
89 reload
91 status)
92 rhstatus
94 condrestart)
95 [ -f /var/lock/subsys/winbindd ] && restart || :
98 echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}"
99 exit 1
100 esac
102 exit $?