0

I'm new to bash scripting and making a initial setup script that I can run to quickly set up a new install.

When installing ddclient

sudo apt-get install ddclient -y

it opens a command line configuration screen as below

ddclient setup wizard

How do I navigate these wizards in my bash script? In a generalized case (other tools like Raspbian's raspi-config use a similar configuration screen), the script needs the ability in the bash script to move up, down, left, right, tab to select the <Ok>, enter to select item, add text etc.

How can the bash script exit these configuration screens? Then the script could easily replace the configuration file with a custom version.

0

If you set the environment variable DEBIAN_CLENT to "noninteractive" it will suppress this the configuration stage.

You'll get various errors through not having the configuration stage, but as you have a configuration file to put in place that shouldn't be a problem:

sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ddclient -y

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.