-
Notifications
You must be signed in to change notification settings - Fork 4
/
gen.sh
executable file
·50 lines (48 loc) · 1.64 KB
/
gen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env bash
if [ -d "/home/streamcreed" ];then
xtreamcodes="ok"
wwwdir="/home/streamcreed/wwwdir"
crondir="cronstreamcreed"
elif [ -d "/home/xtreamcodes/iptv_xtream_codes" ];then
xtreamcodes="ok"
wwwdir="/home/xtreamcodes/iptv_xtream_codes/wwwdir"
crondir="cron"
else
xtreamcodes="no"
wwwdir="/var/www/html"
crondir="cronapache"
fi
cat > $wwwdir/xmltv/guide.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<tv generator-info-name="Euroiptv EPG" generator-info-url="https://github.com/andykimpe/euroiptv-epg-fr">
EOF
bash <(wget -qO- https://github.com/andykimpe/euroiptv-epg-fr/raw/master/gen2.sh)
echo "</tv>" >> $wwwdir/xmltv/guide.xml
cp $wwwdir/xmltv/guide.xml $wwwdir/xmltv/guide.xml.save
rm -f $wwwdir/xmltv/guide.xml.gz
gzip $wwwdir/xmltv/guide.xml
mv $wwwdir/xmltv/guide.xml.save $wwwdir/xmltv/guide.xml
cd
rm -rf euroiptv-epg-fr
git clone git@github.com:andykimpe/euroiptv-epg-fr.git euroiptv-epg-fr
cd euroiptv-epg-fr
rm -f guide.xml
cp $wwwdir/xmltv/guide.xml ./
git add --all *
git commit -a -m "update guide.xml"
git push origin master
cd
rm -rf euroiptv-epg-fr
if [ -f /home/streamcreed/crons/epg.php ]
then
/home/streamcreed/php/bin/php /home/streamcreed/crons/epg.php
elif [ -f /home/xtreamcodes/iptv_xtream_codes/crons/epg.php ]
then
/home/xtreamcodes/iptv_xtream_codes/php/bin/php /home/xtreamcodes/iptv_xtream_codes/crons/epg.php
elif [ -f /home/streamcreed/crons/epg_checking.php ]
then
/home/streamcreed/php/bin/php /home/streamcreed/crons/epg_checking.php
elif [ -f /home/xtreamcodes/iptv_xtream_codes/crons/epg_checking.php ]
then
/home/xtreamcodes/iptv_xtream_codes/php/bin/php /home/xtreamcodes/iptv_xtream_codes/crons/epg_checking.php
fi