This PR adds the ability to execute the installation script non-interactively, useful for automated provisioning scripts such as Chef, Puppet, Ansible, Salt, etc.
Simply feed the environment variables into the install script to skip the prompts.
For debug and verification purposes, the script will still output the selected config variables.
The plus side is that the environment variables also support command substitution (see REDIS_EXECUTABLE).
```
sudo REDIS_PORT=1234 REDIS_CONFIG_FILE=/etc/redis/1234.conf REDIS_LOG_FILE=/var/log/redis_1234.log REDIS_DATA_DIR=/var/lib/redis/1234 REDIS_EXECUTABLE=`command -v redis-server` ./utils/install_server.sh
Welcome to the redis service installer
This script will help you easily set up a running redis server
Selected config:
Port : 1234
Config file : /etc/redis/1234.conf
Log file : /var/log/redis_1234.log
Data dir : /var/lib/redis/1234
Executable : /usr/local/bin/redis-server
Cli Executable : /usr/local/bin/redis-cli
Copied /tmp/1234.conf => /etc/init.d/redis_1234
Installing service...
Successfully added to chkconfig!
Successfully added to runlevels 345!
Starting Redis server...
Installation successful!
```
This was discovered by _bodya and reported in the IRC channel.
Everything worked fine as these scripts are always executed as shell
scripts.
Closes#1728
After talking with Pieter he changed my mind about this, it is better to
have a simpler install script that works everywhere, and the complex one
can be always executed if needed by hand. We'll make possibly a new
target for the full featured installation script, and even suggest it
after a Make install.
This reverts commit f1e60d7530.