ITPub博客

首页 > Linux操作系统 > Linux操作系统 > winbindd 执行档

winbindd 执行档

原创 Linux操作系统 作者:bontonpan 时间:2009-01-30 12:49:00 0 删除 编辑

#!/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博客 ” ,链接:http://blog.itpub.net/11754813/viewspace-544785/,如需转载,请注明出处,否则将追究法律责任。

上一篇: smb 执行档
下一篇: postgresql执行档
请登录后发表评论 登录
全部评论

注册时间:2009-01-30

  • 博文量
    52
  • 访问量
    36809