diff --git a/installers/common.sh b/installers/common.sh index 4cc13c2..dee2294 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -74,15 +74,15 @@ function download_latest_files() { fi install_log "Downloading latest MSM configuration file" - sudo wget https://raw.github.com/marcuswhybrow/minecraft-server-manager/latest/msm.conf \ + sudo wget ${UPDATE_URL}/msm.conf \ -O "$dl_dir/msm.conf.orig" || install_error "Couldn't download configuration file" install_log "Downloading latest MSM cron file" - sudo wget https://raw.github.com/marcuswhybrow/minecraft-server-manager/latest/cron/msm \ + sudo wget ${UPDATE_URL}/cron/msm \ -O "$dl_dir/msm.cron.orig" || install_error "Couldn't download cron file" install_log "Downloading latest MSM version" - sudo wget https://raw.github.com/marcuswhybrow/minecraft-server-manager/latest/init/msm \ + sudo wget ${UPDATE_URL}/init/msm \ -O "$dl_dir/msm.init.orig" || install_error "Couldn't download init file" } @@ -91,7 +91,8 @@ function patch_latest_files() { # patch config file install_log "Patching MSM configuration file" sudo sed 's#USERNAME="minecraft"#USERNAME="'$msm_user'"#g' "$dl_dir/msm.conf.orig" | \ - sed "s#/opt/msm#$msm_dir#g" >"$dl_dir/msm.conf" + sed "s#/opt/msm#$msm_dir#g" | \ + sed "s#UPDATE_URL=.*\$#UPDATE_URL=\"$UPDATE_URL\"#" >"$dl_dir/msm.conf" # patch cron file install_log "Patching MSM cron file" diff --git a/installers/debian.sh b/installers/debian.sh index d589e85..aa2cb0d 100755 --- a/installers/debian.sh +++ b/installers/debian.sh @@ -1,4 +1,5 @@ -wget -q https://raw.github.com/marcuswhybrow/minecraft-server-manager/master/installers/common.sh -O /tmp/msmcommon.sh +UPDATE_URL="https://raw.github.com/marcuswhybrow/minecraft-server-manager/master" +wget -q ${UPDATE_URL}/installers/common.sh -O /tmp/msmcommon.sh source /tmp/msmcommon.sh && rm -f /tmp/msmcommon.sh function update_system_packages() { @@ -32,4 +33,4 @@ function enable_init() { fi } -install_msm \ No newline at end of file +install_msm diff --git a/installers/redhat.sh b/installers/redhat.sh index 3a4be87..17a73ba 100755 --- a/installers/redhat.sh +++ b/installers/redhat.sh @@ -1,4 +1,5 @@ -wget -q https://raw.github.com/marcuswhybrow/minecraft-server-manager/master/installers/common.sh -O /tmp/msmcommon.sh +UPDATE_URL="https://raw.github.com/marcuswhybrow/minecraft-server-manager/master" +wget -q ${UPDATE_URL}/installers/common.sh -O /tmp/msmcommon.sh source /tmp/msmcommon.sh && rm -f /tmp/msmcommon.sh function update_system_packages() { diff --git a/msm.conf b/msm.conf index 621630b..4ca9f0c 100644 --- a/msm.conf +++ b/msm.conf @@ -166,3 +166,7 @@ DEFAULT_MESSAGE_COMPLETE_BACKUP_STARTED="Backing up entire server." # The default message to send to players when a server finishes backing up the # entire server directory: DEFAULT_MESSAGE_COMPLETE_BACKUP_FINISHED="Backup complete." + +# Default github url to pull updates from. Do not change this unless you want +# to use another github fork of msm. +UPDATE_URL="https://raw.github.com/marcuswhybrow/minecraft-server-manager/master"