I'm writing a hadoop configuration script, but I'm running into trouble installing ganglia. The script needs to run all the way through without any human intervention. Unfortunately, but when it hits this line, it breaks:
sudo apt-get install ganglia-monitor ganglia-webfrontend
The script freezes here. If you attempt to break out with Ctrl-D, or Ctrl-C it fails badly after attempting to run a bunch of commands
Looking more closely, the problem is that ganglia demands user input when you install it. During the apt-get call, a screen like this pops up:
Package configuration ------------------[ Configuring ganglia-webfrontend ]------------------ In order to activate the new configuration, the web server needs to be restarted. If you choose not to do this automatically, you should do so manually at the first opportunity. Restart apache2? <No> <Yes>
Is there any way to avoid this screen? Adding the -y tag to apt-get (i.e. apt-get install ganlgi -y) doesn't work.