Github bot : script beautyshied

This commit is contained in:
github-actions
2023-12-24 03:38:08 +00:00
parent d47aa81b1b
commit 237173f370
13 changed files with 195 additions and 195 deletions

View File

@@ -25,12 +25,12 @@ if bashio::config.true 'openvpn_enabled'; then
# Function to check for files path # Function to check for files path
function check_path () { function check_path () {
# Get variable # Get variable
file="$1" file="$1"
# Loop through each line of the input file # Loop through each line of the input file
while read line while read line
do do
# Check if the line contains a txt file # Check if the line contains a txt file
if [[ "$line" =~ \.txt ]] || [[ "$line" =~ \.crt ]]; then if [[ "$line" =~ \.txt ]] || [[ "$line" =~ \.crt ]]; then
# Extract the txt file name from the line # Extract the txt file name from the line
@@ -49,10 +49,10 @@ do
fi fi
fi fi
fi fi
done < "$file" done < "$file"
# Standardize lf # Standardize lf
dos2unix "$file" dos2unix "$file"
# Correct paths # Correct paths
@@ -76,7 +76,7 @@ dos2unix "$file"
check_path /config/openvpn/"$openvpn_config" check_path /config/openvpn/"$openvpn_config"
# Copy potential additional files # Copy potential additional files
cp /config/openvpn/* /etc/openvpn/ cp /config/openvpn/* /etc/openvpn/
# Standardize file   # Standardize file
cp /config/openvpn/"${openvpn_config}" /etc/openvpn/config.ovpn cp /config/openvpn/"${openvpn_config}" /etc/openvpn/config.ovpn
# Not correct type # Not correct type
else else