mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Fix empty input overriding defaults
This commit is contained in:
parent
b30ce11a96
commit
4a830b3c7a
@ -19,12 +19,18 @@ function install_error() {
|
|||||||
function config_installation() {
|
function config_installation() {
|
||||||
install_log "Configure installation"
|
install_log "Configure installation"
|
||||||
echo -n "Install directory [${msm_dir}]: "
|
echo -n "Install directory [${msm_dir}]: "
|
||||||
read input && msm_dir=${input-$msm_dir}
|
read input
|
||||||
|
if [ ! -z "$input" ]; then
|
||||||
|
msm_dir="$input"
|
||||||
|
fi
|
||||||
|
|
||||||
echo -n "New server user to be created [${msm_user}]: "
|
echo -n "New server user to be created [${msm_user}]: "
|
||||||
read input && msm_user=${input-$msm_user}
|
read input
|
||||||
|
if [ ! -z "$input" ]; then
|
||||||
|
msm_user="$input"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Complete installation with these values? [y/N]: "
|
echo -n "Complete installation with these values? [y/N]: "
|
||||||
read answer
|
read answer
|
||||||
|
|
||||||
if [[ $answer != "y" ]]; then
|
if [[ $answer != "y" ]]; then
|
||||||
@ -47,8 +53,8 @@ function install_dependencies() {
|
|||||||
|
|
||||||
# Verifies existence of or adds user for Minecraft server (default "minecraft")
|
# Verifies existence of or adds user for Minecraft server (default "minecraft")
|
||||||
function add_minecraft_user() {
|
function add_minecraft_user() {
|
||||||
install_log "Creating default user '$msm_user'"
|
install_log "Creating default user '${msm_user}'"
|
||||||
sudo useradd $msm_user || install_error "Couldn't create server user"
|
sudo useradd ${msm_user} || install_error "Couldn't create server user"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Verifies existence and permissions of msm server directory (default /opt/msm)
|
# Verifies existence and permissions of msm server directory (default /opt/msm)
|
||||||
|
Loading…
Reference in New Issue
Block a user