From daef0507f70c226a7f111e24ac29dc21156f69d2 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Mon, 9 Dec 2024 23:40:07 -0600 Subject: [PATCH] fix: Works with cron properly --- qbt-set-forwarded-port.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qbt-set-forwarded-port.sh b/qbt-set-forwarded-port.sh index 99c4333..9af75d5 100644 --- a/qbt-set-forwarded-port.sh +++ b/qbt-set-forwarded-port.sh @@ -9,8 +9,9 @@ set -e qbt_username="${QBT_USERNAME:-admin}" qbt_password="${QBT_PASSWORD:-adminadmin}" qbt_addr="${QBT_ADDR:-http://localhost:8085}" # ex. http://10.0.1.48:8080 +gluetun_container="${GLUETUN_COMTAINER:-'qbt-gluetun'}" -port_number=$(docker exec -it qbt-gluetun cat /tmp/gluetun/forwarded_port) +port_number=$(docker exec "$gluetun_container" cat /tmp/gluetun/forwarded_port) if [ -z "$port_number" ]; then echo "Could not figure out which port to set."