From 32d9fb707892e5b73adac5e347519eba9129555e Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 27 Apr 2021 11:52:46 +0200 Subject: [PATCH] Prevent error file '/etc/openvpn/credentials' is group or others accessible --- qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh index 59f7b1e02..0350ae2b5 100644 --- a/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/93-openvpn.sh @@ -21,9 +21,13 @@ if bashio::config.true 'openvpn_enabled'; then echo "${openvpn_username}" > /etc/openvpn/credentials openvpn_password=$(bashio::config 'openvpn_password') echo "${openvpn_password}" >> /etc/openvpn/credentials + + chmod 600 /etc/openvpn/credentials sed -i 's/auth-user-pass.*/auth-user-pass \/etc\/openvpn\/credentials/g' /etc/openvpn/config.ovpn bashio::log.info "openvpn correctly set, qbittorrent will run tunnelled through openvpn" + + sed -i "1a\/etc/openvpn/up-qbittorrent.sh \"\${4}\" &\n" /etc/openvpn/up.sh ######################### # CONFIGURE QBITTORRENT #