File: winbind.init

package info (click to toggle)
samba 3.0.24-6etch10
  • links: PTS
  • area: main
  • in suites: etch
  • size: 49,836 kB
  • ctags: 44,390
  • sloc: ansic: 335,711; sh: 8,133; perl: 7,045; makefile: 3,107; python: 2,370; exp: 1,147; yacc: 881; awk: 486; csh: 58; sed: 45
file content (53 lines) | stat: -rw-r--r-- 1,216 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

### BEGIN INIT INFO
# Provides:          winbind
# Required-Start:    $network $local_fs $remote_fs
# Required-Stop:     $network $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: start Winbind daemon
### END INIT INFO


PATH=/sbin:/bin:/usr/sbin:/usr/bin

[ -r /etc/default/winbind ] && . /etc/default/winbind

DAEMON=/usr/sbin/winbindd

# clear conflicting settings from the environment
unset TMPDIR

# See if the daemon is there
test -x $DAEMON || exit 0

. /lib/lsb/init-functions

case "$1" in
	start)
		log_daemon_msg "Starting the Winbind daemon" "winbind"

		mkdir -p /var/run/samba/winbindd_privileged || return 1
		chgrp winbindd_priv /var/run/samba/winbindd_privileged/ || return 1
		chmod 0750 /var/run/samba/winbindd_privileged/ || return 1
		start-stop-daemon --start --quiet --oknodo --exec $DAEMON -- $WINBINDD_OPTS

		log_end_msg $?
		;;

	stop)
		log_daemon_msg "Stopping the Winbind daemon" "winbind"
		start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
		log_end_msg $?
		;;

	restart|force-reload)
		$0 stop && sleep 2 && $0 start
		;;

	*)
		echo "Usage: /etc/init.d/winbind {start|stop|restart|force-reload}"
		exit 1
		;;
esac