Files
StreamingCommunity/rss_generator.sh

46 lines
1.4 KiB
Bash
Raw Normal View History

2025-01-18 20:08:12 +01:00
#!/bin/bash
# SETTARE QUESTA VARIABILE CON IL PERCORSO GIUSTO:
2025-01-19 00:58:54 +01:00
# Es: PWD_SC="/var/www/html/streamingcommunity"
2025-01-26 18:10:37 +01:00
# O LASCIARE COSIƬ PER TESTARE IN LOCALE
2025-01-18 20:08:12 +01:00
PWD_SC="$PWD"
# Formatta il link e lo stampa
formatted="https://$(cat "$PWD_SC/attuale.txt")"
2025-01-19 00:58:54 +01:00
echo "$formatted"
2025-01-18 20:08:12 +01:00
data=$(date +%Y-%m-%d)
2025-01-19 00:58:54 +01:00
# Crea pagina "rss.xml"
2025-01-18 20:08:12 +01:00
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
2025-01-26 18:59:58 +01:00
# Setta permessi giusti standalone selfhosted (LEGGERE GLI NB)
# NB DECOMMENTARE QUESTI COMANDI SOLO SE USI rss_generator selfhosted MA NON makeindex.sh
# NB NELLA MAGGIORPARTE DEI CASI TI SERVIRA' SOLO IL COMANDO PER GLI XML
#chown -R root:root $PWD_SC; chmod 740 $PWD_SC/*; echo "reset a root dei permessi della cartella $PWD_SC e tutti i suoi file"
#chmod +x $PWD_SC ; echo "permetto a chiunque di attraversare $PWD_SC"
2025-02-04 18:30:10 +01:00
#chown root:root ./*.sh; chmod 744 ./*.sh; echo "do i permessi giusti agli sh dentro $PWD_SC"
2025-01-26 18:59:58 +01:00
# Setta permessi giusti versione selfhosted con make_index (versione tipica)
#chown -R www-data:www-data $PWD_SC/*.xml; chmod -R 744 $PWD_SC/*.xml; echo "do i permessi giusti agli xml dentro a $PWD_SC"