From: Philipp Skadorov <philipp.skadorov@savoirfairelinux.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] lighttpd: source default file from startup script
Date: Wed, 8 Mar 2017 13:44:12 -0500 (EST) [thread overview]
Message-ID: <1980559102.275301.1488998652295.JavaMail.zimbra@savoirfairelinux.com> (raw)
In-Reply-To: <20170308173420.525msvchrmgpajia@tarshish>
Hi Baruch,
----- Original Message -----
> From: "Baruch Siach" <baruch@tkos.co.il>
> To: "Philipp Skadorov" <philipp.skadorov@savoirfairelinux.com>
> Cc: buildroot at buildroot.org
> Sent: Wednesday, March 8, 2017 12:34:20 PM
> Subject: Re: [Buildroot] [PATCH 1/1] lighttpd: source default file from startup script
> Hi Philipp,
>
> On Wed, Mar 08, 2017 at 10:21:14AM -0500, Philipp Skadorov wrote:
>> lighttpd server runs cgi application that has no way to get environment
>> variables that are set up for it.
>>
>> S50lighttpd is changed to source /etc/default/lighttpd file where these
>> environment variables can be set up.
>>
>> Signed-off-by: Philipp Skadorov <philipp.skadorov@savoirfairelinux.com>
>> ---
>> package/lighttpd/S50lighttpd | 10 ++++++++--
>> 1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/package/lighttpd/S50lighttpd b/package/lighttpd/S50lighttpd
>> index 44ac257c1..b3518cd27 100644
>> --- a/package/lighttpd/S50lighttpd
>> +++ b/package/lighttpd/S50lighttpd
>> @@ -2,15 +2,21 @@
>> #
>> # Starts lighttpd.
>> #
>> +NAME=lighttpd
>> +DAEMON=/usr/sbin/$NAME
>> +PID_FILE="/var/run/$NAME.pid"
>> +CONF_FILE="/etc/$NAME/$NAME.conf"
>
> Should be
>
> CONF_FILE="/etc/default/$NAME.conf"
>
> to mach the commit log text.
>
You are referring to the package original config file, /etc/lighttpd/lighttpd.conf.
It has gone nowhere from /etc/lighttpd dir.
Before the daemon is run with it, the new file /etc/default/lighttpd
is sourced (if present) to set up the custom environment.
Regards,
Philipp
>> +
>> +[ -r /etc/default/$NAME ] && . /etc/default/$NAME
>>
>> start() {
>> printf "Starting lighttpd: "
>> - start-stop-daemon -S -q -p /var/run/lighttpd.pid --exec /usr/sbin/lighttpd --
>> -f /etc/lighttpd/lighttpd.conf
>> + start-stop-daemon -S -q -p $PID_FILE --exec $DAEMON -- -f $CONF_FILE
>> echo "OK"
>> }
>> stop() {
>> printf "Stopping lighttpd: "
>> - start-stop-daemon -K -q -p /var/run/lighttpd.pid
>> + start-stop-daemon -K -q -p $PID_FILE
>> echo "OK"
>> }
>> restart() {
>
> baruch
>
> --
> http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
> - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
next prev parent reply other threads:[~2017-03-08 18:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 15:21 [Buildroot] [PATCH 1/1] lighttpd: source default file from startup script Philipp Skadorov
2017-03-08 17:34 ` Baruch Siach
2017-03-08 18:44 ` Philipp Skadorov [this message]
2017-03-08 18:57 ` Baruch Siach
2017-03-08 20:11 ` Thomas Petazzoni
2017-03-08 20:43 ` [Buildroot] [PATCH v2 1/2] lighttpd: carry common keywords out to variables Philipp Skadorov
2017-03-08 20:43 ` [Buildroot] [PATCH v2 2/2] lighttpd: source default file from startup script Philipp Skadorov
2017-03-09 20:53 ` [Buildroot] [PATCH v2 1/2] lighttpd: carry common keywords out to variables Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1980559102.275301.1488998652295.JavaMail.zimbra@savoirfairelinux.com \
--to=philipp.skadorov@savoirfairelinux.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox