2024-10-20_21-12-39_CEST

This commit is contained in:
Ken Fallon 2024-10-20 21:12:39 +02:00
parent 8bf6aad70b
commit faa14cd6da
3 changed files with 40 additions and 0 deletions

27
bin/check_assets.bash Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
# CC-0 Ken Fallon
assets_db="assets_202410181601.csv"
total="$( wc -l assets_202410181601.csv | awk '{print $1}' )"
count=1
awk '{print $2}' "${assets_db}" | grep -E 'ogg|spx|mp3' | while read this_asset_name
do
this_asset="/mnt/data/HPR/${this_asset_name}"
#echo -ne "\r$(\date "+%Y-%m-%d %H:%M:%S") The scanner lid is CLOSED. \r"
if [ ! -s "${this_asset}" ]
then
echo "ERROR: \"${this_asset}\" missing."
else
this_size="$( ls -al "${this_asset}" | awk '{print $5}' )"
this_sha1sum="$( sha1sum "${this_asset}" | awk '{print $1}' )"
if [ "$( grep -cE "${this_asset_name}.*${this_size}.*${this_sha1sum}" "${assets_db}" )" -ne 1 ]
then
echo "ERROR: \"${this_asset}\" incorrect properties."
fi
fi
echo -ne "\rProcessing ${count} of ${total}"
count=$((count+1))
done
exit

6
bin/run-speedtest.bash Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# * * * * * /usr/local/bin/run-speedtest.bash >/dev/null 2>&1
speedtest-cli --json | jq '.' > /var/www/html/speedtest.json
chown apache:apache /var/www/html/speedtest.json

7
hub/redirect.php Normal file
View File

@ -0,0 +1,7 @@
<?php
# request.php > request_confirm.php > upload.php > upload_confirm.php
#require "/home/hpr/php/include.php";
?>
<?php
header('location:https://hub.hackerpublicradio.org/calendar.php');
?>