mirror of
https://github.com/samba-team/samba.git
synced 2025-03-24 10:50:22 +03:00
Eventscripts: 50.samba - only start/stop nmbd if $CTDB_SERVICE_NMB set.
Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit defaec99df8c279d8e315d5010f9146e013afda2)
This commit is contained in:
parent
8fb04d451e
commit
e66a1af9b3
@ -39,7 +39,9 @@ service_start ()
|
||||
if [ "$_service_name" = "samba" ] || \
|
||||
is_ctdb_managed_service "samba" ; then
|
||||
service "$CTDB_SERVICE_SMB" stop > /dev/null 2>&1
|
||||
service "$CTDB_SERVICE_NMB" stop > /dev/null 2>&1
|
||||
if [ -n "$CTDB_SERVICE_NMB" ] ; then
|
||||
service "$CTDB_SERVICE_NMB" stop > /dev/null 2>&1
|
||||
fi
|
||||
killall -0 -q smbd && {
|
||||
sleep 1
|
||||
# make absolutely sure samba is dead
|
||||
@ -81,10 +83,12 @@ service_start ()
|
||||
is_ctdb_managed_service "samba" ; then
|
||||
net serverid wipe
|
||||
|
||||
nice_service "$CTDB_SERVICE_NMB" start || {
|
||||
if [ -n "$CTDB_SERVICE_NMB" ] ; then
|
||||
nice_service "$CTDB_SERVICE_NMB" start || {
|
||||
echo failed to start nmbd
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
fi
|
||||
nice_service "$CTDB_SERVICE_SMB" start || {
|
||||
echo failed to start samba
|
||||
exit 1
|
||||
@ -101,7 +105,9 @@ service_stop ()
|
||||
if [ "$_service_name" = "samba" ] || \
|
||||
is_ctdb_managed_service "samba" ; then
|
||||
service "$CTDB_SERVICE_SMB" stop
|
||||
service "$CTDB_SERVICE_NMB" stop
|
||||
if [ -n "$CTDB_SERVICE_NMB" ] ; then
|
||||
service "$CTDB_SERVICE_NMB" stop
|
||||
fi
|
||||
fi
|
||||
|
||||
# stop the winbind service
|
||||
|
Loading…
x
Reference in New Issue
Block a user