Mail archive
alpine-devel

Re: [alpine-devel] Re: How to run script at startup

From: Jeremy Thomerson <jeremy_at_thomersonfamily.com>
Date: Sat, 15 Oct 2011 12:40:38 -0400

Awesome writeup, thanks!

Jeremy Thomerson
-- sent from my "smart" phone, so please excuse spelling, formatting, or
compiler errors

On Oct 15, 2011 12:32 PM, "Adèlphe Rafanambinana" <radelphe_at_gmail.com>
wrote:

After doing some search in Internet, I found that OpenRC/baselayout2 changed
the way how to run a script/program as local service during startup.

local service is part of the predefined service in default runlevel. It is
responsible for handling the scripts defined in /etc/local.d. The scripts,
with suffix .start or .stop, are executed in lexical order (during start or
stop of the system, depending on the suffix).
That means * /etc/local.d/* is the proper place to put scripts ending with
.start that you want executed during the boot.

What I did:

1. move my script to /etc/local.d
2. rename it to my_script*.start
*3. add local service to start automatically by running the following
command:
  rc-update add local default
4. reboot the machine, and it works.

Thank you,



On Sat, Oct 15, 2011 at 19:09, Jeremy Thomerson <jeremy_at_thomersonfamily.com>
wrote:
>
> It would b...
-- 
arafanam
---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Sat Oct 15 2011 - 12:40:38 UTC