Setting environment variables in a StackScript?

Hello,

I am trying to set an environment variable in a stackscript, but after the server is provisioned with that stack script and I run this command, there is no value.

Command to Test Environment Variable

printenv TESTENVIRONMENT

Here is my very simple stackscript I am testing with. Please help!!!

StackScript Example

#!/bin/bash

export TESTENVIRONMENT=TEST

1 Reply

I came across this post after posting a similar question on behalf of a user here. The advice in that post should get you up and running.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct