mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-04-06 14:16:25 +02:00
Fix OpenVPN auth failure: use printf for credentials, strip bare auth-user-pass, add openvpn to PACKAGES
Agent-Logs-Url: https://github.com/alexbelgium/hassio-addons/sessions/aa214c4f-72c4-487b-80ab-34ddd8a58127 Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ffacba17c5
commit
12eec26de1
@@ -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
|
||||
|
||||
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user