Fix duplicate openvpn config initialization

This commit is contained in:
Benjamin Renard 2024-09-28 17:46:05 +02:00
parent b54d67e343
commit 76e7cb08e6
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC

View file

@ -1,6 +1,6 @@
#!/command/with-contenv bashio
if [ ! -e "/config/openvpn" ]
if [ ! -d "/config/openvpn" ]
then
bashio::log.info "Initialize OpenVPN configuration..."
rsync -a /srv/openvpn/ /config/openvpn/
@ -9,13 +9,6 @@ else
bashio::log.info "OpenVPN configuration already initialized"
fi
if [ ! -d /config/openvpn ]
then
bashio::log.info "Initialize OpenVPN configuration..."
rsync -a /srv/openvpn/ /config/openvpn/
bashio::log.info "done."
fi
# Generate secret on first start
if [ ! -e /config/openvpn/secret.key ]
then