aboutsummaryrefslogtreecommitdiff
path: root/scripts/entrypoint.sh
diff options
context:
space:
mode:
authorChristian Segundo2024-07-23 21:43:05 +0200
committerChristian Segundo2024-07-23 21:43:05 +0200
commit362af4e16d7cdfa1512a6f2f154f055907b4d900 (patch)
treef0e8817df1cad49bd466c60016cdd8b70913690c /scripts/entrypoint.sh
parent076b6aefd5b17cccc34cc403b7b4f2ba4f093a57 (diff)
downloadtransmission-hacks-362af4e16d7cdfa1512a6f2f154f055907b4d900.tar.gz
add ci
Diffstat (limited to 'scripts/entrypoint.sh')
-rw-r--r--scripts/entrypoint.sh43
1 files changed, 0 insertions, 43 deletions
diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh
deleted file mode 100644
index 93c248d..0000000
--- a/scripts/entrypoint.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-set -euo pipefail
-
-cat <<EOF >>/etc/cron.d/crontab
-PYTHON_PATH=/usr/local/bin/python3
-SCRIPT_PREFIX=/scripts
-SCRIPT_TIMEOUT=${SCRIPT_TIMEOUT:-300}
-TRANSMISSION_HOST=${TRANSMISSION_HOST:-localhost}
-TRANSMISSION_PORT=${TRANSMISSION_PORT:-9091}
-EOF
-
-i=0
-while true; do
- key="DELETE_TAG_${i}_NAME"
- val="DELETE_TAG_${i}_AGE"
- if [ -z "${!key:-}" ]; then
- break
- fi
- cat <<EOF >>/etc/cron.d/crontab
-DELETE_TAG_${i}=${!key}
-DELETE_AGE_${i}=${!val}
-EOF
- i=$((i + 1))
-done
-
-i=0
-while true; do
- key="DELETE_UNLINKED_${i}_NAME"
- val="DELETE_UNLINKED_${i}_AGE"
- if [ -z "${!key:-}" ]; then
- break
- fi
- cat <<EOF >>/etc/cron.d/crontab
-DELETE_UNLINKED_TAG_${i}=${!key}
-DELETE_UNLINKED_AGE_${i}=${!val}
-EOF
- i=$((i + 1))
-done
-
-echo "${CRON_EXPRESSION:-* * * * *} /bin/bash /scripts/cron.sh >/proc/1/fd/1 2>/proc/1/fd/2" >>/etc/cron.d/crontab
-cat /etc/cron.d/crontab
-crontab /etc/cron.d/crontab
-cron -f -l "${CRON_LOG_LEVEL:-0}"