up
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
attuale=$(<attuale.txt)
|
||||
attuale=$(</var/www/html/scommunity/attuale.txt)
|
||||
|
||||
nuovo=$(curl -L $attuale | sed -n 's/.*\(https:\/\/cdn\.streamingcommunity\.[^ ]*images[^ ]*\).*/\1/p' | grep -oP 'streamingcommunity\.\w+(\.\w+)?')
|
||||
|
||||
if [ "$attuale" != "$nuovo" ]; then
|
||||
attuale="$nuovo"
|
||||
echo "$attuale" > attuale.txt
|
||||
echo "$attuale" > /var/www/html/scommunity/attuale.txt
|
||||
|
||||
fi
|
||||
|
||||
formatted="https://$(<attuale.txt)"
|
||||
|
||||
formatted="https://$(<//var/www/html/scommunity/attuale.txt)"
|
||||
echo "$formatted"
|
||||
cat <<- _EOF > /var/www/html/scommunity/index.html
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
@@ -87,7 +86,7 @@ cat <<- _EOF > /var/www/html/scommunity/index.html
|
||||
|
||||
<div class="link">
|
||||
<h3>Link aggiornato per Streaming Community:</h3>
|
||||
<h1><a href=$formatted>$formatted</a></h1>
|
||||
<h1> <a href=$formatted> $formatted </a> </h1>
|
||||
<h3>(cambia circa una volta al mese)</h3>
|
||||
</div>
|
||||
|
||||
@@ -99,6 +98,4 @@ cat <<- _EOF > /var/www/html/scommunity/index.html
|
||||
</html>
|
||||
_EOF
|
||||
|
||||
sudo chown -R www-data:www-data /var/www/html/scommunity ; sudo chmod -R 755 /var/www/html/scommunity
|
||||
|
||||
|
||||
sudo chown -R www-data:www-data /var/www/html/scommunity ; sudo chmod -R 755 /var/www/html/scommunity
|
||||
Reference in New Issue
Block a user