diff --git a/attuale.txt b/attuale.txt index d634fc3..a80c868 100644 --- a/attuale.txt +++ b/attuale.txt @@ -1 +1 @@ -streamingcommunity.paris +streamingcommunity.hiphop diff --git a/deprecati/README.md b/deprecati/README.md deleted file mode 100644 index 6e20c67..0000000 --- a/deprecati/README.md +++ /dev/null @@ -1,44 +0,0 @@ -#### 1. Genera una pagina html con il link aggiornato di streamingcommunity - -Le istruzioni di installazione/settaggio sono uguali sia per [make_index.sh](./make_index.sh) che per [make_index_without_stats.sh](./make_index_without_stats.sh), entrambi richiedono [attuale.txt](attuale.txt):
-- [make_index.sh](./make_index.sh): Genera la index scaricando le stats ([make_stats.sh](make_stats.sh)), quindi ne mostra i link sulla index come in [questo link](http://streamingcommunity.accol.li)
-- [make_index_without_stats.sh](./make_index_without_stats.sh): Genera la index senza scaricare e mostrare le stats -```bash -# (richiede "attuale.txt") - -# Setta la variabile "PWD_SC" in testa allo script o lasciala con "PWD" per provare in locale -nano make_index.sh - -# Avvia lo script manualmente -./make_index.sh - -# oppure mettilo in cron -0 0 * * * /path/to/make_index.sh -``` -Se vuoi pubblicarla sul web: aggiusta la variabile PWD_SC in testa allo script [make_index.sh](./make_index.sh), decommenta i comandi in fondo allo stesso script e metti la tua cartella (quella che hai messo in PWD_SC) dietro a un reverse proxy - -
- -#### 2. Crea un feed rss con il link: -```bash -# (richiede "attuale.txt") - -# Setta la variabile "PWD_SC" in testa allo script o lasciala con "PWD" per provare in locale -nano rss_generator.sh - -# Avvia lo manualmente -./rss_generator.sh - -# oppure mettilo in cron -0 0 * * * /path/to/rss_generator.sh -``` -
- -#### 3. Se vuoi semplicemente sapere qual'è il link giusto aggiornato: -```bash -# (richiede "attuale.txt") - -# esgui lo script: -./show_link.sh -``` - diff --git a/deprecati/make_index_old.sh b/deprecati/make_index_old.sh deleted file mode 100755 index da427fc..0000000 --- a/deprecati/make_index_old.sh +++ /dev/null @@ -1,129 +0,0 @@ -#!/bin/bash - -# SETTARE QUESTA VARIABILE CON IL PERCORSO GIUSTO: -# Es: PWD_SC="/var/www/html/streamingcommunity" -PWD_SC="$PWD" - -# Segue link per vedere se è stato aggiornato... -attuale="$(cat "$PWD_SC/attuale.txt")" -nuovo=$(curl --no-progress-meter -L $attuale | sed -n 's/.*\(https:\/\/cdn\.streamingcommunity\.[^ ]*images[^ ]*\).*/\1/p' | grep -oP 'streamingcommunity\.\w+(\.\w+)?') - -# Se il nuovo link è diverso dal nuovo, allora... -if [ "$attuale" != "$nuovo" ]; then - # se è vuoto lascia il vecchio - if [ -z "$nuovo" ]; then - echo "STANNO FACENDO CASINI O LINK CORROTTO. LASCIATO IL VECCHIO LINK" - else - # Se non è vuoto lo aggiorna con il nuovo link il file attuale.txt - attuale="$nuovo" - echo "$attuale" > $PWD_SC/attuale.txt - fi -else - # se il link giusto è ancora il vecchio lascia il vecchio - echo "Il link giusto è ancora il vecchio" -fi - - -# Formatta il link e lo stampa -formatted="https://$(cat "$PWD_SC/attuale.txt")" -echo "$formatted" - -# Crea pagina "index.html" -cat <<- _EOF > $PWD_SC/index.html - - - - - - - - StreamingCommunity Link Giusto - - - -
-

- - - -

- - - - - -

- - - -

-
- - -_EOF - -# Genera le stats scrapate da streaming community sui client più altre cose da capire -./make_stats.sh - -# Da i permessi alla cartella (decommentare se hostato) -#chown -R root:root $PWD_SC; echo "la cartella $PWD_SC è di root" -#chmod +x $PWD_SC ; echo "permetto di leggere dentro a $PWD_SC" -#chmod 740 $PWD_SC/*; echo "reset permessi per tutti i file dentro a $PWD_SC" -#chown -R www-data:www-data $PWD_SC/*.html; chmod -R 744 $PWD_SC/*.html; echo "do i permessi agli html dentro a $PWD_SC" -#chown -R www-data:www-data $PWD_SC/*.json; chmod -R 744 $PWD_SC/*.json; echo "do i permessi ai json dentro a $PWD_SC" -#chown -R www-data:www-data $PWD_SC/*.xml; chmod -R 744 $PWD_SC/*.xml; echo "do i permessi agli xml dentro a $PWD_SC" -#chown root:root ./*.sh; chmod 740 ./*.sh; echo "do i permesi agli sh dentro $PWD_SC" -#chown www-data:www-data ./splash.gif; chmod 744 ./splash.gif; echo "do i permesi alla gif splash" diff --git a/deprecati/make_stats.sh b/deprecati/make_stats.sh deleted file mode 100755 index 81da27c..0000000 --- a/deprecati/make_stats.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -# Scarica pagine "test" da ip pre CF -curl --no-progress-meter -L http://52.203.236.205:8080/ -o stats1.html -curl --no-progress-meter -L http://52.203.236.205:8081/ -o stats2.html -curl --no-progress-meter -L http://52.203.236.205:8080/download/userViewer.json -o userViewer.json -curl --no-progress-meter -L http://52.203.236.205:8080/download/userVieweOperation.json -o userVieweOperation.json - -# Aggiusta link -sed -i 's|/download/userViewer.json|./userViewer.json|g' stats1.html -sed -i 's|/download/userViewer.json|./userViewer.json|g' stats2.html -sed -i 's|/download/userVieweOperation.json|./userVieweOperation.json|g' stats1.html -sed -i 's|/download/userVieweOperation.json|./userVieweOperation.json|g' stats2.html - -# Paranoid Hardenoid -sed -i 's/\.js/[.]js/g' stats1.html -sed -i 's/\.js/[.]js/g' stats2.html -sed -i 's/\.php/[.]php/g' stats1.html -sed -i 's/\.php/[.]php/g' stats2.html -sed -i 's/\.py/[.]py/g' stats1.html -sed -i 's/\.py/[.]py/g' stats2.html -sed -i 's/\.js/[.]js/g' userVieweOperation.json -sed -i 's/\.js/[.]js/g' userViewer.json -sed -i 's/\.php/[.]php/g' userVieweOperation.json -sed -i 's/\.php/[.]php/g' userViewer.json -sed -i 's/\.py/[.]py/g' userVieweOperation.json -sed -i 's/\.py/[.]py/g' userViewer.json - -sed -i 's/\[\.]json/.json/g' stats1.html -sed -i 's/\[\.]json/.json/g' stats2.html \ No newline at end of file diff --git a/index.html b/index.html deleted file mode 100644 index 33a38f6..0000000 --- a/index.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - StreamingCommunity Link Giusto - - - - -
- -

- - - -

- - - - - -

- - - -

- -
- - - diff --git a/make_index.sh b/make_index.sh index f1bb530..996f8ba 100755 --- a/make_index.sh +++ b/make_index.sh @@ -7,7 +7,7 @@ PWD_SC="$PWD" # Segue link per vedere se è stato aggiornato... attuale="$(cat "$PWD_SC/attuale.txt")" -nuovo=$(curl --no-progress-meter -L $attuale | sed -n 's/.*\(https:\/\/cdn\.streamingcommunity\.[^ ]*images[^ ]*\).*/\1/p' | grep -oP 'streamingcommunity\.\w+(\.\w+)?') +nuovo=$(curl --no-progress-meter -L $attuale | sed -n 's/.*\(https:\/\/cdn\.streamingcommunity\.[^ ]*images[^ ]*\).*/\1/p' | grep -oP 'streamingcommunity\.\w+(\.\w+)?' | head -n1) # Se il nuovo link è diverso dal nuovo, allora... if [ "$attuale" != "$nuovo" ]; then diff --git a/show_link.sh b/show_link.sh index d8686cf..e82829f 100755 --- a/show_link.sh +++ b/show_link.sh @@ -5,7 +5,7 @@ PWD_SC="$PWD" # Segue link per vedere se è stato aggiornato... attuale="$(cat "$PWD_SC/attuale.txt")" -nuovo=$(curl --no-progress-meter -L $attuale | sed -n 's/.*\(https:\/\/cdn\.streamingcommunity\.[^ ]*images[^ ]*\).*/\1/p' | grep -oP 'streamingcommunity\.\w+(\.\w+)?') +nuovo=$(curl --no-progress-meter -L $attuale | sed -n 's/.*\(https:\/\/cdn\.streamingcommunity\.[^ ]*images[^ ]*\).*/\1/p' | grep -oP 'streamingcommunity\.\w+(\.\w+)?' | head -n1) # Se il nuovo link è diverso dal nuovo, allora... if [ "$attuale" != "$nuovo" ]; then