Added java as a package dependancy for installers/redhat.sh (needed to properly run jars)

Added option to make msm_user account a system account (resolving issue #194)
This commit is contained in:
Brahm 2013-12-15 18:49:46 -09:00
parent 9ee2974f03
commit 89468ccc19
2 changed files with 13 additions and 4 deletions

View File

@ -1,5 +1,6 @@
msm_dir="/opt/msm"
msm_user="minecraft"
msm_user_system=False
dl_dir="$(mktemp -d -t msm-XXX)"
# Outputs an MSM INSTALL log line
@ -30,9 +31,14 @@ function config_installation() {
msm_user="$input"
fi
echo -n "Add new user as system account? [y/N]: "
read answer
if [[ $answer != "y" ]]; then
$msm_user_system=True
fi
echo -n "Complete installation with these values? [y/N]: "
read answer
if [[ $answer != "y" ]]; then
echo "Installation aborted."
exit 0
@ -54,8 +60,11 @@ function install_dependencies() {
# Verifies existence of or adds user for Minecraft server (default "minecraft")
function add_minecraft_user() {
install_log "Creating default user '${msm_user}'"
sudo useradd ${msm_user} \
--home "$msm_dir"
if $msm_user_system; then
sudo useradd ${msm_user} --home "$msm_dir"
else
sudo useradd ${msm_user} --system --home "$msm_dir"
fi
}
# Verifies existence and permissions of msm server directory (default /opt/msm)

View File

@ -9,7 +9,7 @@ function update_system_packages() {
function install_dependencies() {
install_log "Installing required packages"
sudo yum install screen rsync zip || install_error "Couldn't install dependencies"
sudo yum install screen rsync zip java || install_error "Couldn't install dependencies"
}
function enable_init() {