#!/bin/sh
#
# chkconfig: 35 91 9
#
# description: Start/stops the winbindd daemon.
#
#
# Source function library.
if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
exit 0
fi
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
# Check that winbindd exists.
[ -f /usr/local/samba/sbin/winbindd ] || exit 0
RETVAL=0
start() {
export TMPDIR="/var/tmp"
gprintf "Starting Winbindd services: "
daemon /usr/local/samba/sbin/winbindd
RETVAL=$?
echo
return $RETVAL
}
stop() {
gprintf "Shutting down Winbindd services: "
killproc /usr/local/samba/sbin/winbindd
RETVAL=$?
echo
return $RETVAL
}
restart() {
stop
start
}
mdkstatus() {
status /usr/local/samba/sbin/winbindd
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
status)
mdkstatus
;;
condrestart)
[ -f /var/lock/subsys/smb3 ] && restart || :
;;
*)
gprintf "Usage: %s {start|stop|restart|status|condrestart}\n" "$0"
exit 1
esac
exit $?
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/11754813/viewspace-544785/
,如需转载,请注明出处,否则将追究法律责任。