How do you pass in command line arguments to install.sh?


#1

I was wondering how you would execute this command: curl -sSL https://get.replicated.com/docker | sudo bash -s no-auto ui-bind-port=8000 if the script was already downloaded via sudo bash ./install.sh

sudo bash -s no-auto ./install.sh
Doesn’t seem to work.

Getting this from: https://help.replicated.com/docs/native/customer-installations/installing-via-script/

Additionally how do I pass in text to stdin? I am trying to script the installation and test it with various inputs and can’t seem to get it to work.


#2

When running script from a file, you can pass command line arguments as you would with any program

sudo bash ./install.sh no-auto ui-bind-port=8000

You can also sub curl with cat to use the same command format

cat ./install.sh | sudo bash -s no-auto ui-bind-port=8000

I’m not sure what you mean by “pass in text to stdin”. Can you show an example of what you are trying to do?