forked from scossa/StreamingCommunity
34 lines
729 B
Bash
34 lines
729 B
Bash
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
# SETTARE QUESTA VARIABILE CON IL PERCORSO GIUSTO:
|
||
|
|
PWD_SC="$PWD"
|
||
|
|
|
||
|
|
# Formatta il link e lo stampa
|
||
|
|
formatted="https://$(cat "$PWD_SC/attuale.txt")"
|
||
|
|
echo "$formatted" #per debug
|
||
|
|
|
||
|
|
data=$(date +%Y-%m-%d)
|
||
|
|
|
||
|
|
# Crea pagina "index.html"
|
||
|
|
cat <<- _EOF > $PWD_SC/rss.xml
|
||
|
|
|
||
|
|
<rss version="2.0">
|
||
|
|
<channel>
|
||
|
|
<title>Fanculo Netflix</title>
|
||
|
|
<link>$formatted</link>
|
||
|
|
<description>Link sempre aggiornato</description>
|
||
|
|
<lastBuildDate>$data</lastBuildDate>
|
||
|
|
<language>it-IT</language>
|
||
|
|
<item>
|
||
|
|
<title>$formatted</title>
|
||
|
|
<link>$formatted</link>
|
||
|
|
<pubDate>$date</pubDate>
|
||
|
|
<guid isPermaLink="false">$formatted</guid>
|
||
|
|
</item>
|
||
|
|
</channel>
|
||
|
|
</rss>
|
||
|
|
|
||
|
|
_EOF
|
||
|
|
|
||
|
|
# Da i permessi alla cartella
|
||
|
|
#sudo chown -R www-data:www-data $PWD_SC ; sudo chmod -R 755 $PWD_SC
|