diff --git a/scripts/install/deb.sh b/scripts/install/deb.sh index 0fea92980..57fc262c0 100644 --- a/scripts/install/deb.sh +++ b/scripts/install/deb.sh @@ -18,18 +18,19 @@ dependencies="nginx maven mysql-server openjdk-8-jdk-headless acl procps curl se export DEBIAN_FRONTEND=noninteractive INSTALLED_TOMCAT=N INSTALLED_MYSQLPYCON=N +APT_GET='apt-get -y -qq -o=Dpkg::Use-Pty=0' -sudo apt-get -y update +sudo ${APT_GET} update if ! apt-cache -qq show openjdk-8-jdk-headless > /dev/null; then echo "==== Adding openjdk-8 repo ====" if [ "${FCW_INSTALL_VND}" = Ubuntu ]; then - sudo apt-get -y install --no-install-recommends python3-software-properties software-properties-common + sudo ${APT_GET} install --no-install-recommends python3-software-properties software-properties-common sudo add-apt-repository -y ppa:openjdk-r/ppa else echo "deb http://http.debian.net/debian ${FCW_INSTALL_REL}-backports main" | sudo tee --append /etc/apt/sources.list.d/${FCW_INSTALL_REL}-backports.list > /dev/null fi - sudo apt-get -y update + sudo ${APT_GET} update fi if apt-cache -qq show tomcat8 > /dev/null; then @@ -59,12 +60,12 @@ done echo "==== Installing Updates and Dependencies ====" echo "apt-get upgrade" -sudo apt-get -y upgrade +sudo ${APT_GET} upgrade echo "mysql setup..." sudo debconf-set-selections <<< "mysql-server mysql-server/root_password password ${DB_ROOT_PASSWORD}" sudo debconf-set-selections <<< "mysql-server mysql-server/root_password_again password ${DB_ROOT_PASSWORD}" echo "apt-get install dependencies" -sudo apt-get -y install --no-install-recommends ${dependencies} +sudo ${APT_GET} install --no-install-recommends ${dependencies} # Where default-jdk is v7, it may be installed with a higher priority than v8 for n in java javac; do @@ -91,7 +92,7 @@ echo "==== Installing Node.js ====" cd "${TMPINSTDIR}" curl -LOsS 'https://deb.nodesource.com/setup_8.x' sudo bash setup_8.x -sudo apt-get -y install --no-install-recommends nodejs +sudo ${APT_GET} install --no-install-recommends nodejs # Populate ~/.config with current user npm help > /dev/null diff --git a/scripts/install/ext-install.sh b/scripts/install/ext-install.sh index e48e4dc56..ddbc3dc83 100644 --- a/scripts/install/ext-install.sh +++ b/scripts/install/ext-install.sh @@ -34,7 +34,7 @@ ext_install_tomcat8 () { curl -LsS -o "${TMPFILE}" "${TOMCAT_URL}" cd /var/lib - sudo tar -xvzf "${TMPFILE}" + sudo tar -xzf "${TMPFILE}" sudo mv apache-tomcat-8.* tomcat8 rm "${TMPFILE}" @@ -64,7 +64,7 @@ ext_install_tornado () { ( cd "${TMPINSTDIR}" curl -LOsS 'https://github.com/tornadoweb/tornado/archive/v4.5.3.tar.gz' - tar xvfz v4.5.3.tar.gz + tar -xzf v4.5.3.tar.gz cd tornado-4.5.3 sudo -H python3 setup.py install ) diff --git a/scripts/install/install.sh b/scripts/install/install.sh index 97387f879..dfeb93baf 100755 --- a/scripts/install/install.sh +++ b/scripts/install/install.sh @@ -319,7 +319,7 @@ sudo cp -R "${basedir}"/nginx /etc/ if [ "${FCW_INSTALL_MODE}" = TEST ] && [ ! -f /etc/nginx/ssl/freeciv-web.crt ]; then sudo mkdir -p /etc/nginx/ssl/private sudo chmod 700 /etc/nginx/ssl/private - openssl req -x509 -newkey rsa:2048 -keyout freeciv-web.key -out freeciv-web.crt -days 3650 -nodes -subj '/CN=localhost' + openssl req -x509 -newkey rsa:2048 -keyout freeciv-web.key -out freeciv-web.crt -days 3650 -nodes -subj '/CN=localhost' -batch sudo mv freeciv-web.crt /etc/nginx/ssl/ sudo mv freeciv-web.key /etc/nginx/ssl/private/ fi