Rev 4 | Blame | Compare with Previous | Last modification | View Log | RSS feed
#!/bin/sh## chkconfig: - 24 73# description: Starts and stops the Samba winbind daemon# ## pidfile: /var/run/winbindd.pid# config: /etc/samba/smb.conf# Source function library.. /etc/rc.d/init.d/functions# Avoid using root's TMPDIRunset TMPDIR# Source networking configuration.. /etc/sysconfig/network# Check that networking is up.[ ${NETWORKING} = "no" ] && exit 1# Check that smb.conf exists.[ -f /etc/samba/smb.conf ] || exit 6[ -f /etc/sysconfig/samba ] && . /etc/sysconfig/sambaRETVAL=0start() {KIND="Winbind"echo -n $"Starting $KIND services: "daemon winbindd "$WINBINDOPTIONS"RETVAL=$?echo[ $RETVAL -eq 0 ] && touch /var/lock/subsys/winbindd || RETVAL=1return $RETVAL}stop() {echoKIND="Winbind"echo -n $"Shutting down $KIND services: "killproc winbinddRETVAL=$?[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/winbinddecho ""return $RETVAL}restart() {stopstart}reload() {echo -n $"Reloading smb.conf file: "killproc winbindd -HUPRETVAL=$?echoreturn $RETVAL}rhstatus() {status winbinddreturn $?}# Allow status as non-root.if [ "$1" = status ]; thenrhstatusexit $?fi# Check that we are root ... so non-root users stop here[ `id -u` -eq "0" ] || exit 4case "$1" instart)start;;stop)stop;;restart)restart;;reload)reload;;status)rhstatus;;condrestart)[ -f /var/lock/subsys/winbindd ] && restart || :;;*)echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}"exit 2esacexit $?