This commit is contained in:
parent
c92640e098
commit
f5eacc1ef4
3 changed files with 0 additions and 70 deletions
28
deploy.py
28
deploy.py
|
@ -1,28 +0,0 @@
|
|||
from ftplib import FTP
|
||||
import requests
|
||||
from os import listdir, getenv, chdir
|
||||
from io import BytesIO
|
||||
|
||||
# init ftp
|
||||
|
||||
ftp = FTP(getenv('FTP_SERVER'))
|
||||
ftp.login(getenv('FTP_USER'), getenv('FTP_PASSWORD'))
|
||||
|
||||
for f in [i for i in listdir('dist') if i.endswith('.html')]:
|
||||
content = open(f, 'r').read()
|
||||
ftp.storbinary('STOR ' + f, BytesIO(content.encode()))
|
||||
|
||||
ftp.storbinary('STOR geofeed.csv', BytesIO(open('geofeed.csv', 'r').read().encode()))
|
||||
|
||||
# refresh cache
|
||||
|
||||
url = 'https://api.bunny.net/purge?url=https%3A%2F%2Fdn42.m724.eu&async=false' # replace with your URL
|
||||
headers = {
|
||||
'AccessKey': getenv("ACCESS_KEY")
|
||||
}
|
||||
|
||||
response = requests.get(url, headers=headers)
|
||||
|
||||
# Quit ftp
|
||||
|
||||
ftp.quit()
|
40
pinger.sh
40
pinger.sh
|
@ -1,40 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# List of targets to ping (replace with your desired addresses/hostnames)
|
||||
targets=("google.com" "cloudflare.com" "example.com")
|
||||
|
||||
ipv4=false
|
||||
ipv6=false
|
||||
|
||||
# --- Main Script ---
|
||||
|
||||
echo "Checking network connectivity:"
|
||||
|
||||
if ping -c 1 -W 1 "8.8.8.8" &>/dev/null; then
|
||||
echo "IPv4: yes"
|
||||
ipv4=true
|
||||
else
|
||||
echo "IPv4: no"
|
||||
fi
|
||||
|
||||
if ping -c 1 -W 1 "2001:4860:4860::8844" &>/dev/null; then
|
||||
echo "IPv6: yes"
|
||||
ipv6=true
|
||||
else
|
||||
echo "IPv6: no"
|
||||
fi
|
||||
|
||||
echo "Pings to targets:"
|
||||
|
||||
# Ping each target over IPv4 and IPv6
|
||||
for target in "${targets[@]}"; do
|
||||
echo "--- $target ---"
|
||||
|
||||
# IPv4 ping
|
||||
ping -i 0.2 -c 4 $target
|
||||
|
||||
# IPv6 ping
|
||||
ping6 -c 4 $target
|
||||
|
||||
echo "" # Add a blank line for separation
|
||||
done
|
|
@ -1,2 +0,0 @@
|
|||
requests
|
||||
minify-html==0.15.0
|
Loading…
Reference in a new issue