diff --git a/qbittorrent/Dockerfile b/qbittorrent/Dockerfile index 8a6e3c202..25a154645 100644 --- a/qbittorrent/Dockerfile +++ b/qbittorrent/Dockerfile @@ -113,7 +113,7 @@ RUN chmod 744 /ha_automodules.sh && /ha_automodules.sh "$MODULES" && rm /ha_auto # && chmod a+x /etc/s6-overlay/s6-rc.d/$SCRIPTSNAME/* ; done; fi # Manual apps -ARG PACKAGES="ipcalc wireguard-tools libnatpmp iptables ip6tables" +ARG PACKAGES="openvpn ipcalc wireguard-tools libnatpmp iptables ip6tables" # Automatic apps & bashio COPY ha_autoapps.sh /ha_autoapps.sh diff --git a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh index b22b7ec47..607eb4664 100755 --- a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh @@ -42,7 +42,7 @@ else bashio::addon.stop fi -echo -e "${openvpn_username}\n${openvpn_password}" > "${OPENVPN_STATE_DIR}/credentials.conf" +printf '%s\n%s\n' "${openvpn_username}" "${openvpn_password}" > "${OPENVPN_STATE_DIR}/credentials.conf" chmod 600 "${OPENVPN_STATE_DIR}/credentials.conf" if bashio::config.has_value "openvpn_config"; then @@ -99,7 +99,7 @@ sed -i '/^[[:blank:]]*$/d' "${openvpn_runtime_config}" sed -i '/^up/d' "${openvpn_runtime_config}" sed -i '/^down/d' "${openvpn_runtime_config}" sed -i '/^route/d' "${openvpn_runtime_config}" -sed -i '/^auth-user-pass /d' "${openvpn_runtime_config}" +sed -i '/^auth-user-pass/d' "${openvpn_runtime_config}" sed -i '/^cd /d' "${openvpn_runtime_config}" sed -i '/^chroot /d' "${openvpn_runtime_config}" sed -i '$q' "${openvpn_runtime_config}"