Subject: RCinit and env variables

From: Denis <[email-masked]>
Date: Wed, 28 Feb 2024 21:44:46 +0100

Hello,

I'm exploring more and more Alpine Linux for server, and I reallly like 
it! Thank you for all your job.

Now, I'm trying to build a rc-service. A quite simple one, but there is 
one thing I cannot achieve: setting a env variable for the command.

I have:

'''

command="/my_app/exec"

'''

And I want to have

'''

CONFIG_FILE=/home/user/file

'''

set for this command.

I try the classic:

'''

command="CONFIG_FILE=/home/user/file /my_app_exec"

'''

But I get

'''

CONFIG_FILE=/HOME/USER/FILE does not exist

'''

Can someone help me with this problem?

Thank you in advance,

Denis

---

From: "Thomas J. Faughnan Jr." <[email-masked]>
Date: Wed, 28 Feb 2024 17:13:57 -0500

Say your service's init script is /etc/init.d/myapp. Then you may put
`export CONFIG_FILE=/home/user/file` into the configuration file /etc/conf.d/myapp.

---

From: Denis <[email-masked]>
Date: Thu, 29 Feb 2024 11:52:12 +0100

Thank you for your quick response!