How do I access LINODE environment variable in a StackScript?

I am trying echo $LINODE_ID but I get nothing in return.
Linode states in their docs that they make four env. variable available to the StackScript:

LINODE_ID
LINODE_LISHUSERNAME
LINODE_RAM
LINODE_DATACENTERID

None of them seem to be defined.

Are Linode docs outdated?

1 Reply

You should be able to call the environmental variables automatically; they utilize the Linode API. You may find the following resources helpful regarding the use of variables in StackScripts:

StackScript Guide on Linode Community Questions

StackScript UDF Variables

Additionally, if you're able to post the relevant section of your script, someone here may be able to help review it.

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