Make start_server use standard config_backups instead of its own ad-hoc solution

This commit is contained in:
Price Hiller 2021-12-26 01:06:51 -06:00
parent e1224b32e4
commit fa2ce6a3ee

View File

@ -256,12 +256,7 @@ start_server() {
printf "</ServerSettings>\n" >> "temp-serverconfig.xml"
fi
local backups_dir
local backup_file
backups_dir="${server_directory}/Config-Backups"
backup_file="${backups_dir}/serverconfig.xml-$(date +%s)"
mkdir -p "${backups_dir}"
cp "${server_config}" "${backup_file}"
backup_configs "${server_directory}"
mv "temp-serverconfig.xml" "${server_config}"
log "info" "Starting $(important "${server_name}") located at $(important "${server_directory}") on port $(important "${server_port}")"