#2
阳光上的桥2023-01-13 11:15
|
想做成脚本定时运行并且让网页调用,希望高手给改成PHP脚本,先谢谢!(以下希望弄成2个脚本,我好参照)
第一脚本
rm /home/hts/xmltv.log
rm /home/hts/epg.xml
touch /home/hts/xmltv.log
echo "Download starting..." >> /home/hts/xmltvlog/xmltv.log
echo "Time: $(date)" >> /home/hts/xmltvlog/xmltv.log
wget -O /home/hts/epg.xml https://
cat /home/hts/epg.xml | sudo socat - UNIX-CONNECT:/home/hts/.hts/tvheadend/epggrab/xmltv.sock
echo "" >> /home/hts/xmltv.log
echo "Time: $(date)" >> /home/hts/xmltv.log
echo "EPG Updated successfully." >> /home/hts/xmltv.log
第二个脚本
cat /home/hts/epg.xml | sudo socat - UNIX-CONNECT:/home/hts/.hts/tvheadend/epggrab/xmltv.sock