5
# Required-Start: smbd nmbd
6
# Required-Stop: smbd nmbd
9
# Short-Description: ensure Samba daemons are started (nmbd and smbd)
14
# start nmbd, smbd and samba-ad-dc unconditionally
15
# the init scripts themselves check if they are needed or not
18
/etc/init.d/nmbd start
19
/etc/init.d/smbd start
20
/etc/init.d/samba-ad-dc start
23
/etc/init.d/samba-ad-dc stop
28
/etc/init.d/smbd reload
33
/etc/init.d/samba-ad-dc "$1"
37
NMBD_DISABLED=`testparm -s --parameter-name='disable netbios' 2>/dev/null || true`
38
SERVER_ROLE=`samba-tool testparm --parameter-name="server role" 2>/dev/null | tail -1 || true`
39
if [ "$SERVER_ROLE" != "active directory domain controller" ]; then
40
if [ "$NMBD_DISABLED" != "Yes" ]; then
41
/etc/init.d/nmbd status || status=$?
43
/etc/init.d/smbd status || status=$?
45
/etc/init.d/samba-ad-dc status || status=$?
50
echo "Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload|status}"