Files
TorrServerJellyfin/docker-entrypoint.sh
Viacheslav Evseev af14dbbeb8 Fix docker check env flags
Checking for the value of an environment variable according to README.md, not for its existing.
2024-02-22 01:47:50 +03:00

23 lines
526 B
Bash
Executable File

#!/bin/sh
FLAGS="--path $TS_CONF_PATH --logpath $TS_LOG_PATH --port $TS_PORT --torrentsdir $TS_TORR_DIR"
if [[ "$TS_HTTPAUTH" -eq 1 ]]; then FLAGS="${FLAGS} --httpauth"; fi
if [[ "$TS_RDB" -eq 1 ]]; then FLAGS="${FLAGS} --rdb"; fi
if [[ "$TS_DONTKILL" -eq 1 ]]; then FLAGS="${FLAGS} --dontkill"; fi
if [ ! -d $TS_CONF_PATH ]; then
mkdir -p $TS_CONF_PATH
fi
if [ ! -d $TS_TORR_DIR ]; then
mkdir -p $TS_TORR_DIR
fi
if [ ! -f $TS_LOG_PATH ]; then
touch $TS_LOG_PATH
fi
echo "Running with: ${FLAGS}"
torrserver $FLAGS