Missed dependency for new 'pivpn add' requirements

This commit is contained in:
Kaladin Light 2016-04-30 14:40:43 -04:00
parent af19eeb55b
commit 2ee04c6c9b
2 changed files with 7 additions and 3 deletions

View file

@ -343,7 +343,7 @@ checkForDependencies() {
echo ":::"
echo "::: Checking dependencies:"
dependencies=( openvpn easy-rsa git iptables-persistent dnsutils )
dependencies=( openvpn easy-rsa git iptables-persistent dnsutils expect )
for i in "${dependencies[@]}"; do
echo -n "::: Checking for $i..."
if [ "$(dpkg-query -W -f='${Status}' "$i" 2>/dev/null | grep -c "ok installed")" -eq 0 ]; then
@ -353,7 +353,11 @@ checkForDependencies() {
echo iptables-persistent iptables-persistent/autosave_v4 boolean true | $SUDO debconf-set-selections
echo iptables-persistent iptables-persistent/autosave_v6 boolean false | $SUDO debconf-set-selections
fi
$SUDO apt-get -y -qq install "$i" > /dev/null & spinner $!
if [[ $i -eq "expect" ]]; then
$SUDO apt-get -y -qq --no-install-recommends install "$i" > /dev/null & spinner $!
else
$SUDO apt-get -y -qq install "$i" > /dev/null & spinner $!
fi
echo " done!"
else
echo " already installed!"

View file

@ -44,7 +44,7 @@ spinner()
function removeAll {
# Purge dependencies
echo ":::"
dependencies=( openvpn easy-rsa git iptables-persistent dnsutils )
dependencies=( openvpn easy-rsa git iptables-persistent dnsutils expect )
for i in "${dependencies[@]}"; do
if [ "$(dpkg-query -W --showformat='${Status}\n' "$i" 2> /dev/null | grep -c "ok installed")" -eq 1 ]; then
while true; do