diff options
Diffstat (limited to 'main/mini_httpd/mini_httpd.initd')
-rwxr-xr-x[-rw-r--r--] | main/mini_httpd/mini_httpd.initd | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/mini_httpd/mini_httpd.initd b/main/mini_httpd/mini_httpd.initd index ad1917be3e..6e84a18b65 100644..100755 --- a/main/mini_httpd/mini_httpd.initd +++ b/main/mini_httpd/mini_httpd.initd @@ -11,10 +11,14 @@ depend() { } start() { + local logfile=$(awk -F= '$1 == "logfile" { print $2 }' /etc/mini_httpd/${SVCNAME}.conf 2>/dev/null) + : ${logfile:=/var/log/mini_httpd/${SVCNAME}.log} + checkpath -d ${pidfile%/*} + checkpath -d ${logfile%/*} ebegin "Starting $SVCNAME" start-stop-daemon --quiet --start --exec /usr/sbin/mini_httpd \ --pidfile $pidfile -- -i $pidfile \ - ${MINI_HTTPD_OPTS:--C /etc/${SVCNAME}.conf -l /var/log/mini_httpd/${SVCNAME}.log} + ${MINI_HTTPD_OPTS:--C /etc/${SVCNAME}.conf -l ${logfile}} eend $? } |