stop+start winbindd in SWAT and pidfile_create("winbindd")
Jay Ts
jay at toltec.metran.cx
Mon Sep 17 10:54:02 GMT 2001
This looks like the scripts I see on my Red Hat system, so I'm
guessing that it's for Red Hat Linux. (Am I correct or not?)
I think other systems may not have the function libraries
that include the daemon and killproc functions.
The daemon function is not required; you can just start smbd and nmbd as
/usr/local/samba/bin/smbd -D
/usr/local/samba/bin/nmbd -D
and I assume this works for winbindd too. As for killproc,
another method (that works on Red Hat and I'm not sure where
else!) is
/bin/kill -TERM -a smbd
/bin/kill -TERM -a nmbd
Don't use -KILL unless you really have to! Note that /bin/kill is
not the same as the shell's builtin kill command, because it supports
the -a option.
- Jay Ts
> 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-technical
mailing list