Initial commit (I feel unsafe)

This commit is contained in:
2026-01-16 00:11:58 -08:00
commit d69daa37bf
121 changed files with 4153 additions and 0 deletions

18
homepage_server-getimage Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
# shellcheck source=homepage_server-env
. "${HOME}"/"${USER}"-env
headers=$(curl -SsIXGET "$1")
status_code=$(echo "$headers" | grep -E "HTTP/.* [0-9]{3}" | awk '{print $2}')
if [[ $status_code == "200" ]]; then
ext=$(echo "$headers" | grep "content-type:" | awk -F/ '{print $2}' | tr -d " \t\n\r")
curl -Ss -o "${VOLUME_PATH}"/images/"${2}"."${ext}" "${1}"
echo "found"
exit 0
else
echo "Not Found"
exit 1
fi