File: samba.init.master

package info (click to toggle)
samba 3.0.24-6etch10
  • links: PTS
  • area: main
  • in suites: etch
  • size: 49,836 kB
  • ctags: 44,390
  • sloc: ansic: 335,711; sh: 8,133; perl: 7,045; makefile: 3,107; python: 2,370; exp: 1,147; yacc: 881; awk: 486; csh: 58; sed: 45
file content (53 lines) | stat: -rwxr-xr-x 1,129 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
#ident  "@(#)samba.server 1.0   96/06/19 TK"    /* SVr4.0 1.1.13.1*/
#
# Please send info on modifications to knuutila@cs.utu.fi
#
# This file should have uid root, gid sys and chmod 744
#
if [ ! -d /usr/bin ]
then                    # /usr not mounted
        exit
fi

killproc() {            # kill the named process(es)
        pid=`/usr/bin/ps -e |
             /usr/bin/grep -w $1 |
             /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`
        [ "$pid" != "" ] && kill $pid
}

# Start/stop processes required for samba server

case "$1" in

'start')
#
# Edit these lines to suit your installation (paths, workgroup, host)
# Add the following parameters to nmbd, smbd, winbindd if needed
#  (this may be needed for custom file locations)
#  -D -s$BASE/lib/smb.conf
#
   BASE=__BASEDIR__
   $BASE/sbin/nmbd 
   $BASE/sbin/smbd 
   $BASE/sbin/winbindd
   ;;
'stop')
   killproc nmbd
   killproc smbd
   ;;

'restart')
   killproc nmbd
   killproc smbd
   BASE=__BASEDIR__
   $BASE/sbin/nmbd
   $BASE/sbin/smbd
   $BASE/sbin/winbindd
   ;;

*)
   echo "Usage: /etc/init.d/samba { start | stop | restart }"
   ;;
esac