Hi all,
I'd like to run one program at startup. Then I put the command into a bash
script:
#!/bin/bash
/usr/bin/screen -dmS <session_name> </path/to/command>
I create a "rc.local" file and put it to /etc (I tried to put it to
/et/init.d/rc.local too)
When I run it mannually, it works well but it wouldn't start at next boot.
Anyone can help me to get it working?
Thank you,
--
Adèlphe Rafanambinana
Re: [alpine-devel] Re: How to run script at startup
It would be great if you could post your answer here so others searching the
list in the future can find it.
Jeremy Thomerson
-- sent from my "smart" phone, so please excuse spelling, formatting, or
compiler errors
On Oct 15, 2011 11:25 AM, "Adèlphe Rafanambinana" <radelphe@gmail.com>
wrote:
Hi all,
Just to let you know, that I get my answer and it works well.
Thank you,
On Sat, Oct 15, 2011 at 16:23, Adèlphe Rafanambinana <radelphe@gmail.com>
wrote:
>> Hi all,>> I'...
--
Adèlphe Rafanambinana
Re: [alpine-devel] Re: How to run script at startup
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@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@thomersonfamily.com>
wrote:
>> It would b...
--
arafanam
Hi all,
Just to let you know, that I get my answer and it works well.
Thank you,
On Sat, Oct 15, 2011 at 16:23, Adèlphe Rafanambinana <radelphe@gmail.com>wrote:
> Hi all,>> I'd like to run one program at startup. Then I put the command into a bash> script:>> #!/bin/bash> /usr/bin/screen -dmS <session_name> </path/to/command>>> I create a "rc.local" file and put it to /etc (I tried to put it to> /et/init.d/rc.local too)> When I run it mannually, it works well but it wouldn't start at next boot.>> Anyone can help me to get it working?>> Thank you,> --> Adèlphe Rafanambinana>>>
--
Adèlphe Rafanambinana
Re: [alpine-devel] Re: How to run script at startup
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@thomersonfamily.com>wrote:
> It would be great if you could post your answer here so others searching> the list in the future can find it.>> Jeremy Thomerson> -- sent from my "smart" phone, so please excuse spelling, formatting, or> compiler errors>> On Oct 15, 2011 11:25 AM, "Adèlphe Rafanambinana" <radelphe@gmail.com>> wrote:>> Hi all,> Just to let you know, that I get my answer and it works well.> Thank you,>>> On Sat, Oct 15, 2011 at 16:23, Adèlphe Rafanambinana <radelphe@gmail.com>> wrote:> >> > Hi all,> >> > I'...>> --> Adèlphe Rafanambinana>>>
--
arafanam