Set UPDATE_URL in installers and msm.conf

This is to allow for alt repos.
This commit is contained in:
Dave Fallon 2013-06-09 20:48:34 -07:00
parent cefd227e51
commit 235e8aebdc
4 changed files with 14 additions and 7 deletions

View File

@ -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"

View File

@ -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/latest"
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
install_msm

View File

@ -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/latest"
wget -q ${UPDATE_URL}/installers/common.sh -O /tmp/msmcommon.sh
source /tmp/msmcommon.sh && rm -f /tmp/msmcommon.sh
function update_system_packages() {

View File

@ -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/latest"