[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

LSB-ize daemon without pidfile handling


ser2net, a small daemon in a package maintained by me, cannot write
its own pidfile. Since it forks and detaches by default,
start-stop-daemon's --make-pidfile option is of no use as well, since
the daemon that ends up running has a different pid than s-s-d's

Before, I started that daemon with
s-s-d --background --make-pidfile --exec $DAEMON -- -n,
with -n being its option for "do not fork and background yourself".

While I do not find this particularly elegant (is there any better
way?), it precludes me from using /lib/lsb/init-function's
start_daemon function as start_daemon is not able to pass arbitrary
options to s-s-d, and there is no option to invoke --background

How am I supposed to properly lsb-ize ser2net's init script? Is it ok
to directly call s-s-d from the init script or do I need other


-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber         |   " Questions are the         | Mailadresse im Header
Mannheim, Germany  |     Beginning of Wisdom "     | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

Reply to: