:: Re: [DNG] How to deploy an init.d s…
Góra strony
Delete this message
Reply to this message
Autor: Steve Litt
Data:  
Dla: dng
Temat: Re: [DNG] How to deploy an init.d script to Devuan 2.0 (ASCII)
On Wed, 10 Apr 2019 18:54:31 +0200
Steffen Dettmer via Dng <dng@???> wrote:

> Hi,
>
> At work I'm playing with Devuan in a VM supposed to replace
> embedded systems. These systems have special proprietary software
> which is deployed using a proprietary package manager, which
> unfortunately does not support executing scripts (such as
> postinstall).
>
> To start the proprietary software, part of its proprietary
> package is an init.d script. I added
>
> /etc/init.d/ccucvm_startup_script


Hi Steffen,

I know little of sysvinit and therefore can't answer your exact
question, but I've had problems like it for over a decade.

What I always did when I couldn't get an init script to work is I let
Daemontools manage the particular piece of software. Today I'd use
runit or s6 instead, but the principle's exactly the same. Put
Daemontools or runit or s6 as a respawn in /etc/inittab, and then let
Daemontools or runit or s6 run your program.

Basically, all you do is create a run script that starts the
application with the same options as shown in the "start" part of the
init script, EXCEPT that your app should be run in the foreground and
not background itself.

What I've found during the past decade is it's much easier to deploy
and understand a daemon that's supervised by Daemontools,
Daemontools-encore, runit or s6.

SteveT