source: branches/samba-3.3.x/packaging/Example/samba.init@ 715

Last change on this file since 715 was 206, checked in by Herwig Bauernfeind, 16 years ago

Import Samba 3.3 branch at 3.0.0 level (psmedley's port)

File size: 598 bytes
Line 
1#!/bin/sh
2#
3if [ ! -d /usr/bin ]; then
4 echo "The /usr file system is not mounted."
5 exit 1
6fi
7
8killproc() {
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
13}
14
15
16# Start/stop processes required for samba server
17
18case "$1" in
19
20 'start')
21 echo "Starting Samba"
22 /usr/local/samba/sbin/smbd
23 /usr/local/samba/sbin/nmbd
24 echo "Done."
25 ;;
26 'stop')
27 killproc smbd
28 killproc nmbd
29 ;;
30 *)
31 echo "Usage: /sbin/init.d/samba.init [ start | stop ]"
32 ;;
33esac
34exit 0
Note: See TracBrowser for help on using the repository browser.