#!/bin/bash

docker stop tmm &
BACK_PID=$!
wait $BACK_PID

docker run --rm --name=tinymediamanagerscript \
-v /mnt/user/appdata/tmm:/config \
-v /mnt/user:/media \
-e GROUP_ID=0 -e USER_ID=0 -e TZ=Europe/Madrid \
romancin/tinymediamanager:develop /config/tinyMediaManagerCMD.sh -update -scrapeNew

docker start tmm