uhttp配置文件:/etc/config/uhttpd
uhttp启动命令: /etc/init.d/uhttpd start|stop
lighttpd配置文件:/etc/lighttpd/lighttpd.conf
lighttpd启动命令:/etc/init.d/lighttpd start|stop
开机自启动尝试方式:1、enable <==失败
/etc/init.d/uhttpd enable <==失败
开机自启动尝试方式:2、Luci 页面设置:【系统】 【启动项】<==设置失败
开机自启动尝试方式:3、rc.local系统启动 <==失败
cat /etc/rc.local
/etc/init.d/uhttpd-start start 2>/dev/null
开机自启动尝试方式:4、lighttpd开机启动文件附带开机启动uhttpd <==成功
配置文件路径:/etc/init.d/lighttpd
修改部分:start最后加入uhttpd启动命令
start() {
…
/etc/init.d/uhttpd start
}
/etc/init.d/lighttpd 修改后展示
root@GL-XE300:~# cat /etc/init.d/lighttpd
#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org
SERVICE_USE_PID=1
START=99
start() {
access_port=$(uci get glconfig.general.port)
[ -n "$access_port" ] && {
sed -i "1s/^.*$/\$SERVER[\"socket\"] == \":$access_port\" \{/" /etc/lighttpd/conf.d/10-port.conf
sync
}
listen_port=$(netstat -anp|grep :80|awk '{printf $7}'|cut -d/ -f1)
[ -n "$listen_port" ] && {
/etc/init.d/uhttpd stop
/etc/init.d/uhttpd disable
}
mkdir -m 0755 -p /var/log/lighttpd
service_start /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
/etc/init.d/uhttpd start <== uhttpd启动命令
}
stop() {
rm /tmp/api.socket-0
service_stop /usr/sbin/lighttpd
}