stop+start winbindd in SWAT and pidfile_create("winbindd")

Michels, Gustavo [EES/BR] gustavo.michels at emersonenergy.com
Mon Sep 17 10:22:16 GMT 2001


Here is a little start/stop script for samba with winbind. If you type
'samba status' you get the pid for winbind. Hope my mailer doesn't screw
everything... :-)


----------<------------
#!/bin/bash
#
# Script para Samba
#

# Source function library.
#!/bin/bash
#
# Script para Samba
#

# Source function library.
. /etc/init.d/functions


RETVAL=0
prog="Samba"

start() {
# Start Program

echo -n $"Starting $prog: "
daemon /usr/local/samba/bin/smbd -D
daemon /usr/local/samba/bin/nmbd -D
daemon /usr/local/samba/bin/winbindd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/samba
return $RETVAL
}

stop() {
# Stop daemons
echo -n $"Shutting down $prog: "
killproc smbd
killproc nmbd
killproc winbindd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/samba
return $RETVAL
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart|reload)
        stop
        start
        RETVAL=$?
        ;;
  status)
        status smbd
        status nmbd
        status winbindd
        RETVAL=$?
        ;;
  who)
        /usr/local/samba/bin/smbstatus
        ;;
  config)
        vi /usr/local/samba/lib/smb.conf
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart|status|who|config}"
        exit 1
esac

exit $RETVAL
----------<------------

Cheers
Gustavo


-----Original Message-----
From: Ephi Dror [mailto:edror at panasas.com] 
Sent: segunda-feira, 17 de setembro de 2001 13:49
To: Samba (E-mail); Samba-Technical (E-mail)
Subject: stop+start winbindd in SWAT and pidfile_create("winbindd")


Hi All,

Any idea why we do not create pidfile for winbindd as we do for nmbd and
smbd using:   pidfile_create(name)

It can be useful for some management scripts.

Also, in swat, what about stop and start winbindd as we do for smbd and nmbd

Thanks a lot
Ephi


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba




More information about the samba mailing list