changes
This commit is contained in:
parent
0ae6ef74c9
commit
34569fef8a
11
socks5.sh
11
socks5.sh
@ -19,6 +19,15 @@ set -e
|
|||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Wait for unlocking:
|
||||||
|
wait_for_lock() {
|
||||||
|
while fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do
|
||||||
|
echo "Waiting for /var/lib/dpkg/lock-frontend to be unlocked..."
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
echo "Find active network interface..."
|
echo "Find active network interface..."
|
||||||
INTERFACE=$(ip -o -4 route show to default | awk '{print $5}')
|
INTERFACE=$(ip -o -4 route show to default | awk '{print $5}')
|
||||||
|
|
||||||
@ -30,7 +39,9 @@ fi
|
|||||||
echo "Active network interface found: $INTERFACE"
|
echo "Active network interface found: $INTERFACE"
|
||||||
|
|
||||||
echo "Install dante-server..."
|
echo "Install dante-server..."
|
||||||
|
wait_for_lock
|
||||||
apt-get update
|
apt-get update
|
||||||
|
wait_for_lock
|
||||||
apt-get install -y dante-server
|
apt-get install -y dante-server
|
||||||
|
|
||||||
echo "Backup existing configuration file $DANTE_CONF..."
|
echo "Backup existing configuration file $DANTE_CONF..."
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user