From 4003b8248557bf0893e5ddc39b5f3bc2b0dafc5f Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Fri, 22 Apr 2016 11:52:33 -0500 Subject: [PATCH] Make sure basic commands exist --- vpnsetup.sh | 7 +++++-- vpnsetup_centos.sh | 3 ++- vpnupgrade_Libreswan.sh | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/vpnsetup.sh b/vpnsetup.sh index f87bc0e..468c9a7 100644 --- a/vpnsetup.sh +++ b/vpnsetup.sh @@ -66,10 +66,13 @@ fi mkdir -p /opt/src cd /opt/src || { echo "Failed to change working dir to /opt/src. Aborting."; exit 1; } -# Update package index and install Wget and dig (dnsutils) +# Update package index export DEBIAN_FRONTEND=noninteractive apt-get -y update + +# Make sure basic commands exist apt-get -y install wget dnsutils +apt-get -y install iproute gawk grep sed net-tools echo echo 'Trying to find Public/Private IP of this server...' @@ -106,7 +109,7 @@ fi # Install necessary packages apt-get -y install libnss3-dev libnspr4-dev pkg-config libpam0g-dev \ libcap-ng-dev libcap-ng-utils libselinux1-dev \ - libcurl4-nss-dev flex bison gcc make sed \ + libcurl4-nss-dev flex bison gcc make \ libunbound-dev libnss3-tools libevent-dev apt-get -y --no-install-recommends install xmlto apt-get -y install xl2tpd diff --git a/vpnsetup_centos.sh b/vpnsetup_centos.sh index 4dddee0..b897189 100644 --- a/vpnsetup_centos.sh +++ b/vpnsetup_centos.sh @@ -78,8 +78,9 @@ fi mkdir -p /opt/src cd /opt/src || { echo "Failed to change working dir to /opt/src. Aborting."; exit 1; } -# Install Wget and dig (bind-utils) +# Make sure basic commands exist yum -y install wget bind-utils +yum -y install iproute gawk grep sed net-tools echo echo 'Trying to find Public/Private IP of this server...' diff --git a/vpnupgrade_Libreswan.sh b/vpnupgrade_Libreswan.sh index d434a1c..630d074 100644 --- a/vpnupgrade_Libreswan.sh +++ b/vpnupgrade_Libreswan.sh @@ -95,7 +95,7 @@ apt-get -y install wget # Install necessary packages apt-get -y install libnss3-dev libnspr4-dev pkg-config libpam0g-dev \ libcap-ng-dev libcap-ng-utils libselinux1-dev \ - libcurl4-nss-dev flex bison gcc make sed \ + libcurl4-nss-dev flex bison gcc make \ libunbound-dev libnss3-tools libevent-dev apt-get -y --no-install-recommends install xmlto