Skip to content

Commit

Permalink
Merge pull request msmhq#193 from IronTetsubo/pull3
Browse files Browse the repository at this point in the history
Add support for alternate github repos
  • Loading branch information
zachlatta committed Sep 6, 2013
2 parents 0b0837c + d490347 commit 0ef8924
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
9 changes: 5 additions & 4 deletions installers/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand All @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions installers/debian.sh
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down Expand Up @@ -32,4 +33,4 @@ function enable_init() {
fi
}

install_msm
install_msm
3 changes: 2 additions & 1 deletion installers/redhat.sh
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
4 changes: 4 additions & 0 deletions msm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 0ef8924

Please sign in to comment.