Skip to content

Commit a01396b

Browse files
committed
qBittorrent mod: Validate that the config file exist. Fix for #684
1 parent 1f6f9a9 commit a01396b

File tree

2 files changed

+12
-0
lines changed
  • docker-mods/qbittorrent/root/etc

2 files changed

+12
-0
lines changed

docker-mods/qbittorrent/root/etc/cont-init.d/98-themepark

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ if [ "${TP_HOTIO}" = true ]; then
1010
APP_FILEPATH='/config/config/qBittorrent.conf'
1111
fi
1212

13+
# Validate that the config file exist
14+
if [[ ! -f "${APP_FILEPATH}" ]]; then
15+
echo "qBittorrent config file not found at ${APP_FILEPATH}. Please ensure qBittorrent is configured correctly."
16+
exit 0
17+
fi
18+
1319
# Backup config
1420
if [[ ! -f "${APP_FILEPATH}.bak" ]]; then
1521
echo "Creating qBittorrent.conf backup in /config."

docker-mods/qbittorrent/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ if [ "${TP_HOTIO}" = true ]; then
1010
APP_FILEPATH='/config/config/qBittorrent.conf'
1111
fi
1212

13+
# Validate that the config file exist
14+
if [[ ! -f "${APP_FILEPATH}" ]]; then
15+
echo "qBittorrent config file not found at ${APP_FILEPATH}. Please ensure qBittorrent is configured correctly."
16+
exit 0
17+
fi
18+
1319
# Backup config
1420
if [[ ! -f "${APP_FILEPATH}.bak" ]]; then
1521
echo "Creating qBittorrent.conf backup in /config."

0 commit comments

Comments
 (0)