From df4bb76ffb11b733b8b6a83a2fc0a2001f09b183 Mon Sep 17 00:00:00 2001 From: Kristian Haugene Date: Sat, 21 Apr 2018 22:31:47 +0200 Subject: [PATCH] Getting error if watch folder doesn't exist --- transmission/userSetup.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/transmission/userSetup.sh b/transmission/userSetup.sh index ee9d2b849..aca053eca 100644 --- a/transmission/userSetup.sh +++ b/transmission/userSetup.sh @@ -9,6 +9,13 @@ if [ -n "$PUID" ] && [ ! "$(id -u root)" -eq "$PUID" ]; then if [ ! "$(id -u ${RUN_AS})" -eq "$PUID" ]; then usermod -o -u "$PUID" ${RUN_AS} ; fi if [ ! "$(id -g ${RUN_AS})" -eq "$PGID" ]; then groupmod -o -g "$PGID" ${RUN_AS} ; fi + # Make sure directories exist before chown and chmod + mkdir -p /config \ + ${TRANSMISSION_HOME} \ + ${TRANSMISSION_DOWNLOAD_DIR} \ + ${TRANSMISSION_INCOMPLETE_DIR} \ + ${TRANSMISSION_WATCH_DIR} + echo "Setting owner for transmission paths to ${PUID}:${PGID}" chown -R ${RUN_AS}:${RUN_AS} \ /config \