Necessary packages

This commit is contained in:
Return
2024-05-22 15:02:08 +03:30
committed by GitHub
parent 43576a0cfd
commit f34929e837

View File

@ -1,15 +1,9 @@
#!/bin/bash #!/bin/bash
# Ensure jq is installed # Ensure jq and qrencode are installed
if ! command -v jq &> /dev/null; then if ! command -v jq &> /dev/null || ! command -v qrencode &> /dev/null; then
echo "jq could not be found, installing..." echo "Necessary packages are not installed. Please wait while they are being installed..."
apt-get update -qq && apt-get install jq -y >/dev/null 2>&1 apt-get update -qq && apt-get install jq qrencode -y >/dev/null 2>&1
fi
# Ensure qrencode is installed
if ! command -v qrencode &> /dev/null; then
echo "qrencode could not be found, installing..."
apt-get update -qq && apt-get install qrencode -y >/dev/null 2>&1
fi fi
# Step 1: Install Hysteria2 # Step 1: Install Hysteria2