1
0
mirror of synced 2024-11-26 06:46:06 +03:00
This commit is contained in:
hwdsl2 2021-08-13 22:10:44 -05:00
parent 97d90ec379
commit 6ce1be392d

View File

@ -139,14 +139,11 @@ fi
bigecho "VPN setup in progress... Please be patient." bigecho "VPN setup in progress... Please be patient."
mkdir -p /opt/src
cd /opt/src || exit 1
count=0 count=0
APT_LK=/var/lib/apt/lists/lock apt_lk=/var/lib/apt/lists/lock
PKG_LK=/var/lib/dpkg/lock pkg_lk=/var/lib/dpkg/lock
while fuser "$APT_LK" "$PKG_LK" >/dev/null 2>&1 \ while fuser "$apt_lk" "$pkg_lk" >/dev/null 2>&1 \
|| lsof "$APT_LK" >/dev/null 2>&1 || lsof "$PKG_LK" >/dev/null 2>&1; do || lsof "$apt_lk" >/dev/null 2>&1 || lsof "$pkg_lk" >/dev/null 2>&1; do
[ "$count" = "0" ] && bigecho "Waiting for apt to be available..." [ "$count" = "0" ] && bigecho "Waiting for apt to be available..."
[ "$count" -ge "100" ] && exiterr "Could not get apt/dpkg lock." [ "$count" -ge "100" ] && exiterr "Could not get apt/dpkg lock."
count=$((count+1)) count=$((count+1))
@ -154,6 +151,9 @@ while fuser "$APT_LK" "$PKG_LK" >/dev/null 2>&1 \
sleep 3 sleep 3
done done
mkdir -p /opt/src
cd /opt/src || exit 1
bigecho "Installing packages required for setup..." bigecho "Installing packages required for setup..."
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive