diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-05-02 08:43:52 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-05-02 08:51:59 +0000 |
commit | c08ec0cafaaf25b4c83499fac69819b919354f45 (patch) | |
tree | 35784317d7ee4d27daf6e57d4726e14ab2ab8109 /main/mini_httpd/mini_httpd.initd | |
parent | 9d0eac076fd40cc142247a8235a4d8f1b67a35f8 (diff) | |
download | aports-c08ec0cafaaf25b4c83499fac69819b919354f45.tar.bz2 aports-c08ec0cafaaf25b4c83499fac69819b919354f45.tar.xz |
main/mini_httpd: move config to /etc/mini_httpd/
and provide upgrade path
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 $? } |