summaryrefslogtreecommitdiff
path: root/iptv.sh
diff options
context:
space:
mode:
authorLi Zhineng <[email protected]>2024-07-03 22:54:52 +0800
committerLi Zhineng <[email protected]>2024-07-03 22:54:52 +0800
commitc61c1fefc9adbc11e27d4ec66c16158f74b70f5b (patch)
treeb224cbc29b5a0a6188fb15a1aa16611d7d8ac554 /iptv.sh
parentfa8f195d72c60442ea892e8c91dc97dec463a3a6 (diff)
downloadchina-unicom-iptv-gd-c61c1fefc9adbc11e27d4ec66c16158f74b70f5b.tar.gz
china-unicom-iptv-gd-c61c1fefc9adbc11e27d4ec66c16158f74b70f5b.zip
checks dependencies
Diffstat (limited to 'iptv.sh')
-rwxr-xr-xiptv.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/iptv.sh b/iptv.sh
index 5280be5..da80728 100755
--- a/iptv.sh
+++ b/iptv.sh
@@ -46,6 +46,20 @@ if [[ -z "$mac_address" ]]; then
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
##