Ensure config ends with a line feed

This commit is contained in:
Alexandre
2023-12-29 14:19:09 +01:00
parent e3f2cf2e24
commit 7d25223c27
2 changed files with 9 additions and 3 deletions

View File

@@ -53,12 +53,15 @@ if bashio::config.true 'openvpn_enabled'; then
fi
fi
done < /tmpfile
rm /tmpfile
# Standardize lf
dos2unix "$file"
# Ensure config ends with a line feed
sed -i "\$q" "$file"
# Correct paths
sed -i "s=/etc/openvpn=/config/openvpn=g" "$file"

View File

@@ -108,9 +108,12 @@ function check_path () {
fi
fi
done < /tmpfile
rm /tmpfile
# Ensure config ends with a line feed
sed -i "\$q" "$file"
}
# Define custom file