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">
|
||||
@@ -100,5 +99,3 @@ cat <<- _EOF > /var/www/html/scommunity/index.html
|
||||
_EOF
|
||||
|
||||
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