File: samba.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 (34 lines) | stat: -rwxr-xr-x 598 bytes parent folder | download | duplicates (25)
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
#!/bin/sh
#
if [ ! -d /usr/bin ]; then
	echo "The /usr file system is not mounted."
        exit 1
fi

killproc() {         
        pid=`/bin/ps ax | grep -w $1 | sed -e 's/^  *//' -e 's/ .*//'`
	echo "Stopping $1 now."
        [ "$pid" != "" ] && kill -15 $pid
	echo $pid
}


# Start/stop processes required for samba server

case "$1" in

	'start')
	   echo "Starting Samba"
	   /usr/local/samba/sbin/smbd
	   /usr/local/samba/sbin/nmbd
	   echo "Done."
	   ;;
	'stop')
	   killproc smbd
	   killproc nmbd
	   ;;
	*)
	   echo "Usage: /sbin/init.d/samba.init [ start | stop ]"
	   ;;
esac
exit 0