:: Re: [DNG] /etc/boot.d and boot star…
Página Inicial
Delete this message
Reply to this message
Autor: wirelessduck
Data:  
Para: dng
Assunto: Re: [DNG] /etc/boot.d and boot startup scripts


> On 19 Apr 2023, at 02:14, dng@??? wrote:
>
> On 18-04-2023 05:12, wirelessduck--- via Dng wrote:
>> Hi,
>>
>> I'm trying to get a `docker compose` to run on system startup so I
>> thought I could add the shell script that runs `docker compose up -d`
>> into /etc/rc.local. Is that the recommended place to put this sort of
>> thing? My system is running sysvinit on Devuan chimaera.
>>
>> I also saw in /etc/rc.local that it contains a reference to
>> /etc/boot.d which I can't find anywhere on my system. Is /etc/boot.d
>> a better option for this? I can see that it's using a tool called
>> run-parts that I have no experience with.
>>
>> Is there any documentation anywhere on using /etc/boot.d? I couldn't
>> find any references on internet searches.
>>
>> Tom
>> _______________________________________________
>> Dng mailing list
>> Dng@???
>> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>
> Not an answer to your question but why would you run docker compose up -d in your startup? Adding restart: always to your docker-compose.yaml and running it once would do the trick without the need for running another script at boot.
>
> Grtz.
>
> Nick


I’m not sure why I didn’t think of that earlier, so thanks for the tip. However in this case I’ve decided to wrap it in a simple deb package with sysvinit script for ease of deployment onto production systems. In this case I’ve just set the restart policy to unless-stopped.

Tom