#!/usr/bin/with-contenv bash
# shellcheck shell=bash

if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
    exec \
        s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8181" \
            s6-setuidgid abc python3 /app/tautulli/Tautulli.py --datadir /config
else
    exec \
        s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8181" \
            python3 /app/tautulli/Tautulli.py --datadir /config
fi
