Made xmllint a requirement
This commit is contained in:
parent
c05f0ddb2d
commit
c1ac374ba5
@ -268,17 +268,13 @@ start_server() {
|
|||||||
mv "temp-serverconfig.xml" "${server_config}"
|
mv "temp-serverconfig.xml" "${server_config}"
|
||||||
|
|
||||||
# xmllint, helps avoiding the random server launch failures for apparently no reason
|
# xmllint, helps avoiding the random server launch failures for apparently no reason
|
||||||
if which xmllint >/dev/null 2>&1; then
|
for xml_file in "${server_directory}"/*.xml; do
|
||||||
for xml_file in "${server_directory}"/*.xml; do
|
log "info" "Linting $(important "${xml_file}")..."
|
||||||
log "info" "Linting $(important "${xml_file}")..."
|
if ! xmllint "${xml_file}" > /dev/null; then
|
||||||
if ! xmllint "${xml_file}" > /dev/null; then
|
log "error" "Xml parsing error in $(important "${xml_file}"), resolve the error and attempt to start again"
|
||||||
log "error" "Xml parsing error in $(important "${xml_file}"), resolve the error and attempt to start again"
|
return 1
|
||||||
return 1
|
fi
|
||||||
fi
|
done
|
||||||
done
|
|
||||||
else
|
|
||||||
log "warning" "$(important "xmllint") not installed or not in PATH, skipping lint check"
|
|
||||||
fi
|
|
||||||
|
|
||||||
log "info" "Starting $(important "${server_name}") located at $(important "${server_directory}") on game port $(important "${server_port}") and telnet port $(important "${telnet_port}")"
|
log "info" "Starting $(important "${server_name}") located at $(important "${server_directory}") on game port $(important "${server_port}") and telnet port $(important "${telnet_port}")"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user