s3/packaging: Fix build on RHEL when ccache is not available.
[Samba/bjacke.git] / packaging / Example / samba.init
blobc1d605cda0625667ce0a366a356d2f8ec8f11656
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/sbin/smbd
23 /usr/local/samba/sbin/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