Allows quotations around server.properties settings.

This commit is contained in:
Marcus Whybrow 2012-07-10 02:19:17 +01:00
parent 5802a40d1e
commit f120290aae

View File

@ -2041,6 +2041,15 @@ server_load_config() {
if [ ! -z "$line" ]; then if [ ! -z "$line" ]; then
name="$(echo $line | awk -F '=' '{print $1}')" name="$(echo $line | awk -F '=' '{print $1}')"
value="$(echo $line | awk -F '=' '{print $2}')" value="$(echo $line | awk -F '=' '{print $2}')"
# Remove quotations from value
if [[ "$value" =~ ^\"(.*)\" ]]; then
value="${BASH_REMATCH[1]}"
else
if [[ "$value" =~ ^\'(.*)\' ]]; then
value="${BASH_REMATCH[1]}"
fi
fi
fi fi
case "$name" in case "$name" in