Commit 87eb522b authored by Natalie M. Spencer's avatar Natalie M. Spencer

More work on 2.0

Signed-off-by: Natalie M. Spencer's avatarNatalie M. Spencer <nmspencer@icloud.com>
parent df9906fb
#!/bin/bash
#!/usr/local/bin/bash
#
# Run the various routines needed to archive not just the Collegi Minecraft
# server, but the various different sub repositories used by the project. Once
......@@ -11,9 +11,11 @@
# control the different functions needed. Where needed, variables are explained
# by the comment immediately preceding them.
########################################
# Create the Array.
declare -A CONFIG
# Set the current Minecraft Version in use on the server. This is needed so we
# can properly prefix our archive names.
readonly MC_VERSION='1.10.2'
CONFIG[MC_VERSION]='1.10.2'
# The following series of variables specify the information that we need to know
# to connect to the remote server where our Minecraft files live. Most of the
# variable names should be self explanatory.
......@@ -25,11 +27,11 @@ readonly MC_VERSION='1.10.2'
# backed up. There are already so many dependencies that in this version of the
# script I elected to just include the information, as it would be no less
# secure than simply packaging another plaintext file with the program.
readonly SERVER_ADDRESS=''
readonly SERVER_USERNAME=''
readonly SERVER_PASSWORD=''
readonly SERVER_DIRECTORY=''
readonly DOWNLOAD_PATH=''
CONFIG[SERVER_ADDRESS]='add'
CONFIG[SERVER_USERNAME]='usr'
CONFIG[SERVER_PASSWORD]='pass'
CONFIG[SERVER_DIRECTORY]='ser'
CONFIG[DOWNLOAD_PATH]='down'
# The next set of variables declare the repository structure. The most important
# thing to note is that the root repository must be a complete path name. The
# repository variables that follow will be appended to the root path to form the
......@@ -38,16 +40,15 @@ readonly DOWNLOAD_PATH=''
#
# IMPLEMENTATION NOTE
# We define these in an array so that we can iterate through them later.
REPO[0]='/Volumes/Collegi/root.git'
REPO[1]='collegi.repo'
REPO[2]='collegi.configs'
REPO[3]='collegi.logs'
SUBMODULES[0]='collegi.pack'
SUBMODULES[1]='collegi.scripts'
SUBMODULES[2]='collegi.web'
SUBMODULES[3]='collegi.git'
REPO[ROOT]='/Volumes/Collegi/root.git'
REPO[BORG]='collegi.repo'
REPO[CONF]='collegi.configs'
REPO[LOGS]='collegi.logs'
REPO[PACK]='collegi.pack'
REPO[SCRIPT]='collegi.scripts'
REPO[WEB]='collegi.web'
REPO[MAIN]='collegi.git'
readonly REPO
readonly SUBMODULES
# The next variable is important as it sets up the borg repository key. Just as
# with the credentials above, it is possible to utilize a key file to do this,
# but it would add more files to the backup routine and complicate the initial
......@@ -57,8 +58,8 @@ declare -xr BORG_PASSPHRASE=''
# more) should be allocated for content, and a similar number for metadata. It
# is worth noting that we don't use remote encryption through git-annex as it is
# already encrypted through borg.
readonly METADATA_REMOTE='gitlab'
readonly CONTENT_REMOTE='backblaze'
CONFIG[METADATA_REMOTE]='gitlab'
CONFIG[CONTENT_REMOTE]='backblaze'
########################################
# Static Variable Declarations
......@@ -265,5 +266,3 @@ function check_directories() {
done
done
}
check_directories
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment