From 2d4b74b70a407f62939a81dc15166a82bc06b4c9 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Sat, 30 Dec 2023 19:23:16 +0100 Subject: [PATCH] Lint --- qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh index 836c05993..c9da6db53 100755 --- a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh @@ -62,7 +62,7 @@ if bashio::config.true 'openvpn_enabled'; then # Remove custom up & down sed -i '/^up /s/^/#/' "$file" sed -i '/^down /s/^/#/' "$file" - + # Remove blank lines sed -i '/^[[:blank:]]*$/d' "$file" @@ -132,7 +132,7 @@ if bashio::config.true 'openvpn_enabled'; then fi # Add credentials file - file_name="$(echo "$(sed -n "/^auth-user-pass/p" /config/openvpn/"$openvpn_config")" | awk -F' ' '{print $2}')" + file_name="$(sed -n "/^auth-user-pass/p" /config/openvpn/"$openvpn_config" | awk -F' ' '{print $2}')" file_name="${file_name:-null}" if grep -q auth-user-pass /config/openvpn/"$openvpn_config"; then # Credentials specified are they custom ?