if running as non root user (what's should be the default on web-servers) you get: (log.c.118) opening errorlog '/var/log/lighttpd/server.log' failed: Permission denied Fix: create log directory only if not exist and chmod 777 to allow anyone to write and create files inside default log directory Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
17 lines
302 B
Bash
17 lines
302 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2006-2011 OpenWrt.org
|
|
|
|
SERVICE_USE_PID=1
|
|
|
|
START=50
|
|
|
|
start() {
|
|
[ -d /var/log/lighttpd ] || mkdir -p /var/log/lighttpd
|
|
chmod 0777 /var/log/lighttpd
|
|
service_start /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
|
|
}
|
|
|
|
stop() {
|
|
service_stop /usr/sbin/lighttpd
|
|
}
|
|
|