#!/bin/sh # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 # Check that smb.conf exists. [ -f /etc/samba/smb.conf ] || exit 0 # See how we were called. case "$1" in start) echo -n "Starting winbind services: " daemon winbindd echo touch /var/lock/subsys/winbindd ;; stop) echo -n "Shutting down winbind services: " killproc winbindd rm -f /var/lock/subsys/winbindd echo "" ;; status) status winbindd ;; restart) echo -n "Restarting winbind services: " $0 stop $0 start echo "done." ;; *) echo "Usage: winbind {start|stop|restart|status}" exit 1 esac