added -S option to set the domain sid from a domain controller.
[Samba.git] / packaging / Digital / samba.init
blob6a7424408909feb7c77dbcd02626daec30fcc46b
1 #!/bin/sh
3 if [ ! -d /usr/bin ]; then
4 echo "The /usr file system is not mounted."
5 exit 1
6 fi
8 killproc() {
9 pid=`/bin/ps ax | grep -w $1 | sed -e 's/^ *//' -e 's/ .*//'`
10 echo "Stopping $1 now."
11 [ "$pid" != "" ] && kill -15 $pid
12 echo $pid
16 # Start/stop processes required for samba server
18 case "$1" in
20 'start')
21 echo "Starting Samba"
22 /usr/local/samba/bin/smbd
23 /usr/local/samba/bin/nmbd
24 echo "Done."
26 'stop')
27 killproc smbd
28 killproc nmbd
31 echo "Usage: /sbin/init.d/samba.init [ start | stop ]"
33 esac
34 exit 0