Prevent error file '/etc/openvpn/credentials' is group or others accessible

This commit is contained in:
Alexandre
2021-04-27 11:52:46 +02:00
committed by GitHub
parent bfed4173df
commit 32d9fb7078

View File

@@ -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 #