This commit is contained in:
leo 2024-08-06 21:47:44 +05:00
parent 0ae6ef74c9
commit 34569fef8a

View File

@ -19,6 +19,15 @@ set -e
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..."
INTERFACE=$(ip -o -4 route show to default | awk '{print $5}')
@ -30,7 +39,9 @@ fi
echo "Active network interface found: $INTERFACE"
echo "Install dante-server..."
wait_for_lock
apt-get update
wait_for_lock
apt-get install -y dante-server
echo "Backup existing configuration file $DANTE_CONF..."