mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
d6fc4eb405
(This used to be commit 8fde65239d0a9462fb044670220cd3c63bd887cb)
43 lines
658 B
Bash
43 lines
658 B
Bash
#! /bin/sh
|
|
|
|
#
|
|
# Samba server control
|
|
#
|
|
|
|
IS_ON=/etc/chkconfig
|
|
KILLALL=/sbin/killall
|
|
|
|
SAMBAD=/usr/samba/bin/smbd
|
|
#SAMBA_OPTS=-d2
|
|
NMBD=/usr/samba/bin/nmbd
|
|
#NMBD_OPTS=-d1
|
|
|
|
if test ! -x $IS_ON ; then
|
|
IS_ON=true
|
|
fi
|
|
|
|
if $IS_ON verbose ; then
|
|
ECHO=echo
|
|
else # For a quiet startup and shutdown
|
|
ECHO=:
|
|
fi
|
|
|
|
case $1 in
|
|
'start')
|
|
if $IS_ON samba && test -x $SAMBAD; then
|
|
$KILLALL -15 smbd nmbd
|
|
$ECHO "Samba:\c"
|
|
$SAMBAD $SAMBA_OPTS -D; $ECHO " smbd\c"
|
|
$NMBD $NMBD_OPTS -D; $ECHO " nmbd\c"
|
|
$ECHO "."
|
|
fi
|
|
;;
|
|
'stop')
|
|
$ECHO "Stopping Samba Servers."
|
|
$KILLALL -15 smbd nmbd
|
|
;;
|
|
*)
|
|
echo "usage: /etc/init.d/samba {start|stop}"
|
|
;;
|
|
esac
|