#!/bin/bash #cp /etc/resolv.conf.bak /etc/resolv.conf TIMESTAMP=`date` # Set the URL and the destination path guide_url="https://net195hk.mooo.com/iptv/guide.xml" guide_destination="/usr/share/nginx/html/iptv/test.xml" m3u_url="https://net195hk.mooo.com/iptv/stream-link.m3u" m3u_destination="/usr/share/nginx/html/iptv/test.m3u" # Fetch the URL content using curl with Android User-Agent echo "[$TIMESTAMP]: register m3u" curl -H "User-Agent: Android" \ -o "$m3u_destination" "$m3u_url" echo "[$TIMESTAMP]: update epg guide" curl -H "User-Agent: Android" \ -o "$guide_destination" "$guide_url"