mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-18 12:00:31 +02:00
Github bot : script beautyshied
This commit is contained in:
@@ -25,12 +25,12 @@ if bashio::config.true 'openvpn_enabled'; then
|
||||
# Function to check for files path
|
||||
function check_path () {
|
||||
|
||||
# Get variable
|
||||
file="$1"
|
||||
# Get variable
|
||||
file="$1"
|
||||
|
||||
# Loop through each line of the input file
|
||||
while read line
|
||||
do
|
||||
# Loop through each line of the input file
|
||||
while read line
|
||||
do
|
||||
# Check if the line contains a txt file
|
||||
if [[ "$line" =~ \.txt ]] || [[ "$line" =~ \.crt ]]; then
|
||||
# Extract the txt file name from the line
|
||||
@@ -49,10 +49,10 @@ do
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done < "$file"
|
||||
done < "$file"
|
||||
|
||||
# Standardize lf
|
||||
dos2unix "$file"
|
||||
# Standardize lf
|
||||
dos2unix "$file"
|
||||
|
||||
|
||||
# Correct paths
|
||||
@@ -76,7 +76,7 @@ dos2unix "$file"
|
||||
check_path /config/openvpn/"$openvpn_config"
|
||||
# Copy potential additional files
|
||||
cp /config/openvpn/* /etc/openvpn/
|
||||
# Standardize file
|
||||
# Standardize file
|
||||
cp /config/openvpn/"${openvpn_config}" /etc/openvpn/config.ovpn
|
||||
# Not correct type
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user