mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
b99ae51374
(This used to be commit cbe74c0910
)
38 lines
814 B
Bash
Executable File
38 lines
814 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Copyright (c) Timo Knuutila <knuutila@cs.utu.fi> 1996.
|
|
#
|
|
# 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)
|
|
#
|
|
/opt/samba/bin/smbd -D -s/opt/samba/smb.conf
|
|
/opt/samba/bin/nmbd -D -l/opt/samba/log -s/opt/samba/smb.conf
|
|
;;
|
|
'stop')
|
|
killproc nmbd
|
|
killproc smbd
|
|
;;
|
|
*)
|
|
echo "Usage: /etc/init.d/samba.server { start | stop }"
|
|
;;
|
|
esac
|