2.0.0 init

Completely revamped the container to support the new external configuration files.
This commit is contained in:
PassiveLemon
2023-07-19 16:27:14 -04:00
parent 3fc92bac27
commit 5ece7c0da4
4 changed files with 87 additions and 31 deletions

26
docker/notifier.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# Container update notifier. Funny code do not go brrrrrrr
UPDATE=$(curl -s https://api.github.com/repos/PassiveLemon/zoraxy-docker/releases | jq -r 'map(select(.prerelease = false)) | .[0].tag_name')
UPDATE1=$(echo $UPDATE | awk -F. '{print $1}')
UPDATE2=$(echo $UPDATE | awk -F. '{print $2}')
UPDATE3=$(echo $UPDATE | awk -F. '{print $3}')
DOCKER1=$(echo $DOCKER | awk -F. '{print $1}')
DOCKER2=$(echo $DOCKER | awk -F. '{print $2}')
DOCKER3=$(echo $DOCKER | awk -F. '{print $3}')
NOTIFY=0
if [ "${DOCKER1}" -lt "${UPDATE1}" ]; then
NOTIFY=1
fi
if [ "${DOCKER1}" -le "${UPDATE1}" ] && [ "${DOCKER2}" -lt "${UPDATE2}" ]; then
NOTIFY=1
fi
if [ "${DOCKER1}" -le "${UPDATE1}" ] && [ "${DOCKER2}" -le "${UPDATE2}" ] && [ "${DOCKER3}" -lt "${UPDATE3}" ]; then
NOTIFY=1
fi
if [ "${NOTIFY}" = "1" ] && [ "${NOTIFS}" != "0" ]; then
echo "|| Container update available. Current (${DOCKER}): New (${UPDATE}). ||"
fi