8

I'd like to install an application using a standard bash- or shell-script, in order to deploy the application on several servers without a user interaction.

To give an example, let's say I'd like to install Pi Hole, which is pretty easy to install but it will open a graphical setup in order to install all components. When installing this application via a script the installation will fail or it'll be not working due to a lack of information.

Is there a way to skip graphical setups like this in Debian and provide a configuration file to provide the needed information while the setup process?

enter image description here

3
  • If it's using the standard Debian installer, then wiki.debian.org/DebianInstaller/Preseed will work... Or debconf-set-selections if it's after the install phase. Not an answer because that's essentially throwing the manual at you.
    – derobert
    Commented Feb 23, 2018 at 18:56
  • For non-interactive install you can set environment variable export DEBIAN_FRONTEND=noninteractive before running apt-get install. It will choose default values than.
    – mviereck
    Commented Feb 23, 2018 at 19:57
  • Edit the functions under github.com/pi-hole/pi-hole/blob/master/automated%20install/…
    – GAD3R
    Commented Feb 23, 2018 at 20:57

2 Answers 2

1

If you just want to disable the debconf questions, all you need to do is set the DEBIAN_FRONTEND environment variable to noninteractive:

DEBIAN_FRONTEND=noninteractive apt-get install foo bar baz
0

This guide has the information you are looking for. It is going to vary on a software to software basis. I had previously misread the question as if you needed an unattended pihole install. As mentioned by user derobert, this is not much of a solution. Good Luck!

Create /etc/pihole/setupVars.conf with the variables you want as outlined here.

After you have created the setupVars.conf to your specification, you can run:

curl -L https://install.pi-hole.net | bash /dev/stdin --unattended

This should install pihole without needing additional input. It is up to you if you want to create a script that will create the setupVars.conf or copy the first one you create for new installs. Do not forget to look through the documentation. Good luck!

You must log in to answer this question.

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