forked from HPR/hpr_hub
2024-10-20_21-12-39_CEST
This commit is contained in:
parent
8bf6aad70b
commit
faa14cd6da
27
bin/check_assets.bash
Executable file
27
bin/check_assets.bash
Executable 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
6
bin/run-speedtest.bash
Normal 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
7
hub/redirect.php
Normal 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');
|
||||||
|
?>
|
Loading…
Reference in New Issue
Block a user