#------------------------------------------------------------------------------
detecting_cur_version() {
+ empty_line
info "Trying to detect current version of Minecraft server."
cd "${MC_BACKUP_DIR}"
#------------------------------------------------------------------------------
get_upstream_info() {
+ empty_line
info "Trying to get info about current upstream version."
local upstream_manifest=$( curl -s "${VERSION_MANIFEST}" )
#------------------------------------------------------------------------------
do_download() {
+ empty_line
info "Downloading upstream server.jar => '${CYAN}${TARGET_JAR}${NORMAL}' ..."
if [[ -f "${TARGET_JAR}" ]] ; then
#------------------------------------------------------------------------------
check_sha1() {
+ empty_line
info "Checking SHA1 sum integrety of '${CYAN}${TARGET_JAR}${NORMAL}' ..."
if [[ ! -f "${TARGET_JAR}" ]] ; then
#------------------------------------------------------------------------------
fix_symlinks() {
+ empty_line
info "Checking symlink in '${CYAN}${MC_BACKUP_DIR}${NORMAL}' ..."
local symlink_was_set="n"
#------------------------------------------------------------------------------
restart_service() {
+ empty_line
+ info "Checking for services to restart ..."
+
local -a services=()
local service=
local svc_status=
done
if [[ "${#services[*]}" == 0 ]] ; then
+ empty_line
info "No services found to restart."
return
fi