mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Merge pull request #236 from sk4ly/master
A couple small bug/feature fixes
This commit is contained in:
commit
046bf299fb
@ -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)
|
||||
|
@ -4,12 +4,12 @@ source /tmp/msmcommon.sh && rm -f /tmp/msmcommon.sh
|
||||
|
||||
function update_system_packages() {
|
||||
install_log "Updating sources"
|
||||
sudo yum update || install_error "Couldn't update packages"
|
||||
sudo yum update --skip-broken || install_error "Couldn't update 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() {
|
||||
|
Loading…
Reference in New Issue
Block a user