1#!/bin/sh 2#ident "@(#)samba.server 1.0 96/06/19 TK" /* SVr4.0 1.1.13.1*/ 3# 4# Please send info on modifications to knuutila@cs.utu.fi 5# 6# This file should have uid root, gid sys and chmod 744 7# 8if [ ! -d /usr/bin ] 9then # /usr not mounted 10 exit 11fi 12 13killproc() { # kill the named process(es) 14 pid=`/usr/bin/ps -e | 15 /usr/bin/grep -w $1 | 16 /usr/bin/sed -e 's/^ *//' -e 's/ .*//'` 17 [ "$pid" != "" ] && kill $pid 18} 19 20# Start/stop processes required for samba server 21 22case "$1" in 23 24'start') 25# 26# Edit these lines to suit your installation (paths, workgroup, host) 27# Add the following parameters to nmbd, smbd, winbindd if needed 28# (this may be needed for custom file locations) 29# -D -s$BASE/lib/smb.conf 30# 31 BASE=__BASEDIR__ 32 $BASE/sbin/nmbd 33 $BASE/sbin/smbd 34 $BASE/sbin/winbindd 35 ;; 36'stop') 37 killproc nmbd 38 killproc smbd 39 ;; 40 41'restart') 42 killproc nmbd 43 killproc smbd 44 BASE=__BASEDIR__ 45 $BASE/sbin/nmbd 46 $BASE/sbin/smbd 47 $BASE/sbin/winbindd 48 ;; 49 50*) 51 echo "Usage: /etc/init.d/samba { start | stop | restart }" 52 ;; 53esac 54