1

I'm trying to create an automation script that install Graphite without user interaction (unattended).

I try with the following command:

sudo apt-get -q -y --force-yes install graphite-carbon=0.9.12-3

During the installation, I will be asked whether I want Carbon to remove the database files.

Do you know if there is a way to run an installation without these kind of UI? I have only this problem with Graphite-carbon.

2 Answers 2

1

At the moment, I am automating complicated setups too. To accomplish this task, I use AutoExpect. It records keyboard input into an Expect script, which can be run again.

sudo apt-get install expect-dev

Then you can type

autoexpect

to start recording. When you are finished, simply type Exit to stop recording and save the script. It will be saved in the directory you are in as script.exp The script will not run directly, you will have to adapt it a bit using a text editor. It will not only apply to the software you are installing, you can use it for about anything. More info:

http://linux.die.net/man/1/autoexpect

http://bit.ly/1u9qTQJ

1

I have used:

sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y --force-yes install graphite-carbon

Now it works without any confirmation message.

2
  • Will --force-yes accept the default option (which is 'no')? Or is it forcing the selection of the 'yes' answer? Jan 2, 2017 at 2:27
  • @JeremyHajek I think it's the equivalent of always answer yes. But not sure about that ... Jan 3, 2017 at 11:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .