LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 527|回复: 0

gentoo 安装 thttpd 脚本启不能访问

[复制链接]
发表于 2010-7-15 22:17:06 | 显示全部楼层 |阅读模式
用  emerge thttpd 安装好后 rc-update add thttpd default
添加成服务,/etc/init.d/thttpd start 这样启动后访问没效果,如果用 /usr/sbin/thttpd -C thttpd -C /etc/thttpd/thttpd.conf 启动就访问正常

附thttpd脚本

#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/files/thttpd-2.25/thttpd.init,v 1.2 2006/09/06


depend() {
        need net
}

start() {
        ebegin "Starting thttpd"
        if [ ! -d "$THTTPD_DOCROOT" ]; then
                eend 1 "THTTPD_DOCROOT not set correctly in /etc/conf.d/thttpd"
                exit 1
        fi

        start-stop-daemon --quiet --start --startas /usr/sbin/thttpd \
                --pidfile /var/run/thttpd.pid --chdir "$THTTPD_DOCROOT" -- \
                        ${THTTPD_OPTS}
        eend $?
}

stop() {
        local rc

        ebegin "Stopping thttpd"
        start-stop-daemon --quiet --stop --pidfile /var/run/thttpd.pid
        rc=$?
        rm -f /var/run/thttpd.pid
        eend $rc
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表