~zulcss/samba/server-dailies-3.4

« back to all changes in this revision

Viewing changes to packaging/sysv/samba.init

  • Committer: Chuck Short
  • Date: 2010-09-28 20:38:39 UTC
  • Revision ID: zulcss@ubuntu.com-20100928203839-pgjulytsi9ue63x1
Initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# Copyright (c) Timo Knuutila <knuutila@cs.utu.fi>     1996.
 
4
#
 
5
# This file should have uid root, gid sys and chmod 744
 
6
#
 
7
if [ ! -d /usr/bin ]
 
8
then                    # /usr not mounted
 
9
        exit
 
10
fi
 
11
 
 
12
killproc() {            # kill the named process(es)
 
13
        pid=`/usr/bin/ps -e |
 
14
             /usr/bin/grep -w $1 |
 
15
             /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`
 
16
        [ "$pid" != "" ] && kill $pid
 
17
}
 
18
 
 
19
# Start/stop processes required for samba server
 
20
 
 
21
case "$1" in
 
22
 
 
23
'start')
 
24
#
 
25
# Edit these lines to suit your installation (paths, workgroup, host)
 
26
#
 
27
   /opt/samba/bin/smbd -D -s/opt/samba/smb.conf
 
28
   /opt/samba/bin/nmbd -D -l/opt/samba/log -s/opt/samba/smb.conf
 
29
   ;;
 
30
'stop')
 
31
   killproc nmbd
 
32
   killproc smbd
 
33
   ;;
 
34
*)
 
35
   echo "Usage: /etc/init.d/samba.server { start | stop }"
 
36
   ;;
 
37
esac