Add curl installation check to wsssh-tools hook

- Added curl installation check before downloading wsssh-tools
- Simplified download logic to use curl directly
- This ensures the download tool is available during hook execution
parent 221e7542
#!/bin/bash
# Install wsssh-tools .deb package after main packages are installed
set -e
echo "Installing wsssh-tools .deb package..."
# Install curl if not available
if ! command -v curl >/dev/null 2>&1; then
echo "Installing curl for downloading..."
apt-get update
apt-get install -y curl
fi
# Download wsssh-tools .deb package
WSSSHTOOLS_DEB="wsssh-tools_1.0.0-1_amd64.deb"
WSSSHTOOLS_URL="http://danex.nexlab.it/wsssh-tools_1.0.0-1_amd64.deb"
echo "Downloading wsssh-tools from $WSSSHTOOLS_URL..."
curl -s -L -o "$WSSSHTOOLS_DEB" "$WSSSHTOOLS_URL"
# Verify download
if [ ! -f "$WSSSHTOOLS_DEB" ]; then
echo "Error: Failed to download RustDesk .deb package"
exit 1
fi
WSSSH_DEB=$WSSSHTOOLS_DEB
# Install dependencies first
echo "Installing dependencies for wsssh-tools..."
apt-get update
apt-get install -y libc6 libssl3t64 openssl
# Install wsssh-tools .deb package
echo "Installing wsssh-tools .deb package..."
dpkg -i "$WSSSH_DEB"
# Clean up
rm -f "$TARGET_DEB"
echo "wsssh-tools installation completed successfully"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment