Bash - variable substitution

Hello,

I use Octopus to deploy on Linux servers. Is there a way to substitute variables into conf files?

Thank You in advance for your help.

Hi @sacco,

Thanks for reaching out.

Depending on what you’re trying to do, our documentation on substituting variables into files should get you going. Please let me know if that works for you or if you need further help.

Thanks,
Jeremy

Hi Jeremy,

Thanks for your response.

This solution works when I deploy in Win servers. To get my package on Linux server, I can’t use the “Deploy a package” template but the “Transfer a package” template.
So my application is well deployed on FS. In my conf files, I have Octopus Var (for example #{PORT_NUMBER} and I need to replace by value set in Variable Sets.

Hi @sacco,

You’re correct in that “Transfer a Package” step doesnt have the ability to substitute variables.

You should be able to use the “Deploy a Package” step with a linux server. Were you having issues with it previously?

Thanks,
Jeremy

Hello Jeremy,

Sorry for my late response.
On linux, my issue with the “Deploy a Package” step was du to small space on user home directory (default install path). I found I can change it with “Configure Features”. Now the issue is resolved, I can deploy and update my conf files with “Deploy a Package”

Thank You for all.

1 Like

Hi @sacco,

You’re very welcome. Thank you so much for the update. I’m glad to hear that you got it working.

Have a great rest of your week.

Thanks,
Jeremy

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.