From f5eacc1ef43d6a63d3ae20a5dd70a3d690d64755 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Fri, 11 Oct 2024 13:10:49 +0200 Subject: [PATCH] remove obsolete files --- deploy.py | 28 ---------------------------- pinger.sh | 40 ---------------------------------------- requirements.txt | 2 -- 3 files changed, 70 deletions(-) delete mode 100644 deploy.py delete mode 100755 pinger.sh delete mode 100644 requirements.txt diff --git a/deploy.py b/deploy.py deleted file mode 100644 index be48c06..0000000 --- a/deploy.py +++ /dev/null @@ -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() \ No newline at end of file diff --git a/pinger.sh b/pinger.sh deleted file mode 100755 index 27bd8f9..0000000 --- a/pinger.sh +++ /dev/null @@ -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 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index de724f3..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -requests -minify-html==0.15.0 \ No newline at end of file