#!/usr/bin/with-contenv bash

echo "Starting Tdarr_Server"

ARCHITECTURE=$(uname -m)
MAX_OLD_SPACE=""

if [ "$ARCHITECTURE" != "armv7l" ]; then
    MAX_OLD_SPACE="--max-old-space-size=16384"
fi

exec s6-setuidgid abc /app/Tdarr_Server/Tdarr_Server
