2015-07-15 16:36:16 +00:00
|
|
|
UPDATE_URL="https://raw.githubusercontent.com/msmhq/msm/master"
|
2013-06-10 03:48:34 +00:00
|
|
|
wget -q ${UPDATE_URL}/installers/common.sh -O /tmp/msmcommon.sh
|
2012-11-03 22:35:11 +00:00
|
|
|
source /tmp/msmcommon.sh && rm -f /tmp/msmcommon.sh
|
2012-09-02 17:45:09 +00:00
|
|
|
|
2022-07-25 00:34:02 +00:00
|
|
|
# Installs sudo if it is not installed
|
|
|
|
function install_sudo() {
|
|
|
|
yum -yq install sudo
|
|
|
|
}
|
|
|
|
|
2012-09-02 17:45:09 +00:00
|
|
|
function update_system_packages() {
|
|
|
|
install_log "Updating sources"
|
2022-07-25 00:34:02 +00:00
|
|
|
sudo yum -yq update --skip-broken || install_error "Couldn't update packages"
|
2012-09-02 17:45:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function install_dependencies() {
|
|
|
|
install_log "Installing required packages"
|
2022-07-25 00:34:02 +00:00
|
|
|
sudo yum -yq install jq rsync screen wget zip || install_error "Couldn't install dependencies"
|
|
|
|
if ! command -v java > /dev/null 2>&1; then
|
|
|
|
install_log "Installing Java (OpenJDK 17)"
|
|
|
|
sudo yum -yq install java-17-openjdk || install_error "Couldn't install Java"
|
|
|
|
fi
|
2012-09-02 17:45:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function enable_init() {
|
|
|
|
install_log "Enabling automatic startup and shutdown"
|
2012-11-03 22:20:53 +00:00
|
|
|
sudo chkconfig --add msm
|
2012-09-02 17:45:09 +00:00
|
|
|
}
|
2012-09-13 18:55:31 +00:00
|
|
|
|
2012-11-03 21:23:15 +00:00
|
|
|
install_msm
|