Makethe generic init script use /usr/local/samba/bin
[Samba.git] / packaging / Example / samba.init
blob4f02cd8a1af8e79361b53fdc4f7aeb24183a094f
1 #!/bin/sh
3 SMBD=/usr/local/samba/bin/smbd
4 NMBD=/usr/local/samba/bin/nmbd
6 if [ ! -d /usr/bin ]; then
7 echo "The /usr file system is not mounted."
8 exit 1
9 fi
11 killproc() {
12 pid=`/bin/ps ax | grep -w $1 | sed -e 's/^ *//' -e 's/ .*//'`
13 echo "Stopping $1 now."
14 [ "$pid" != "" ] && kill -15 $pid
15 echo $pid
19 # Start/stop processes required for samba server
21 case "$1" in
23 'start')
24 echo "Starting Samba"
25 $SMBD
26 $NMBD
27 echo "Done."
29 'stop')
30 killproc smbd
31 killproc nmbd
34 echo "Usage: /sbin/init.d/samba.init [ start | stop ]"
36 esac
37 exit 0