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

echo "Caught SIGTERM signal!"
echo "Tell putioarr to shut down."
pid=$(pidof putioarr)
kill ${pid}
# terminate when the deluged process dies
tail --pid=${pid} -f /dev/null
