From c61c1fefc9adbc11e27d4ec66c16158f74b70f5b Mon Sep 17 00:00:00 2001 From: Li Zhineng Date: Wed, 3 Jul 2024 22:54:52 +0800 Subject: checks dependencies --- iptv.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/iptv.sh b/iptv.sh index 5280be5..da80728 100755 --- a/iptv.sh +++ b/iptv.sh @@ -45,6 +45,20 @@ if [[ -z "$mac_address" ]]; then exit 1 fi +## +## Check dependencies +## + +if ! command -v jq &>/dev/null; then + echo "The jq package that handles HTTP JSON response is not installed." + exit 1 +fi + +if ! command -v openssl &>/dev/null; then + echo "The OpenSSL package that handles token computation is not installed." + exit 1 +fi + ## ## Execute the main script ## -- cgit v1.2.3