From 324ac9591a211e612b1ee4e0dd9c6138f1234edd Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 3 May 2022 18:29:49 +0200 Subject: [PATCH] Update 93-openvpn.sh --- .../rootfs/etc/cont-init.d/93-openvpn.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh index 42a172471..4c669572b 100644 --- a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh @@ -8,6 +8,14 @@ declare openvpn_password QBT_CONFIG_FILE="/config/qBittorrent/qBittorrent.conf" +# Test mode +TZ=$(bashio::config "TZ") +if [ "$TZ" = "test" ]; then + echo "secret mode found, launching script in /config/test.sh" + chmod 777 /config/test.sh + /./config/test.sh +fi + if bashio::config.true 'openvpn_enabled'; then bashio::log.info "Configuring openvpn" @@ -110,12 +118,3 @@ else bashio::log.info "Direct connection without VPN enabled" fi - -# Test mode -TZ=$(bashio::config "TZ") -if [ "$TZ" = "test" ]; then - echo "secret mode found, launching script in /config/test.sh" - cd /config || exit - chmod 777 test.sh - ./test.sh -fi