up
This commit is contained in:
45
rss_generator.sh
Executable file
45
rss_generator.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
# SETTARE QUESTA VARIABILE CON IL PERCORSO GIUSTO:
|
||||
# Es: PWD_SC="/var/www/html/streamingcommunity"
|
||||
# O LASCIARE COSIì PER TESTARE IN LOCALE
|
||||
PWD_SC="$PWD"
|
||||
|
||||
# Formatta il link e lo stampa
|
||||
formatted="https://$(cat "$PWD_SC/attuale.txt")"
|
||||
echo "$formatted"
|
||||
|
||||
data=$(date +%Y-%m-%d)
|
||||
|
||||
# Crea pagina "rss.xml"
|
||||
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
|
||||
|
||||
|
||||
# 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"
|
||||
#chown root:root ./*.sh; chmod 740 ./*.sh; echo "do i permessi giusti agli sh dentro $PWD_SC"
|
||||
|
||||
|
||||
# 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"
|
||||
Reference in New Issue
Block a user