[lsb-discuss] Init Script Example

Stew Benedict stewb at linuxfoundation.org
Fri Jan 28 03:17:08 PST 2011

On 01/28/2011 01:38 AM, Olaf van der Spek wrote:
> On Thu, Jan 27, 2011 at 6:59 PM, Stew Benedict
> <stewb at linuxfoundation.org> wrote:
>>> 1. A skeleton LSB compliant init script that one can base it's own scripts on.
>>> 2. This (not yet available) script is probably too long, so a better
>>> API for such scripts would be helpful.
>>> Code duplication should be avoided, so the skeleton should be simple.
>>> For a simple daemon, the input could be:
>>> NAME=lighttpd
>>> DAEMON=/usr/sbin/lighttpd
>>> DAEMON_OPTS="-f /etc/lighttpd/lighttpd.conf"
>>> Ideally the boilerplate required would be just a few lines, instead of
>>> the current 100+ lines.
>> While by no means a definitive example, here is one we use for the
>> appbat "lsb-apache":
>> http://bzr.linuxfoundation.org/loggerhead/lsb/devel/appbat/annotate/head:/scripts/lsb-apache
> Shouldn't force-reload, reload and status actions be included as well?
Good point. If I was packaging this with the goal of using it as a
production package, it certainly should. For the purposes of the
functional verification test in appbat, the included actions are
sufficient. I will open a bug on it though to add those, to make it a
better example.

Stew Benedict
Linux Foundation

More information about the lsb-discuss mailing list