Merge pull request #431 from Next-Door-Tech/cleanup

Very minor - clean up extraneous whitespace
This commit is contained in:
Alexander Savchuk 2023-04-29 19:08:19 +12:00 committed by GitHub
commit 3f5bab876b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 17 additions and 19 deletions

View File

@ -21,14 +21,14 @@ MSM="${MSM_SCRIPT:-/etc/init.d/msm}"
_msm() {
source "$MSM"
local base current options
COMPREPLY=()
current="${COMP_WORDS[$COMP_CWORD]}"
manager_property SERVER_STORAGE_PATH
if [[ $COMP_CWORD == 1 ]]; then
if [ -d "$SETTINGS_SERVER_STORAGE_PATH" ]; then
local servers="$(ls -1 "$SETTINGS_SERVER_STORAGE_PATH")"
@ -80,9 +80,9 @@ _msm() {
server_get_id "${COMP_WORDS[1]}"
local sid="$RETURN"
fi
local server_path="$SETTINGS_SERVER_STORAGE_PATH/${COMP_WORDS[1]}"
local server_path="$SETTINGS_SERVER_STORAGE_PATH/${COMP_WORDS[1]}"
if [[ "${COMP_WORDS[1]}" == "all" ]] || [ -e "$server_path" ]; then
if [[ $COMP_CWORD == 2 ]]; then
options="start stop restart status connected worlds logroll backup jar whitelist blacklist operator gamemode kick say time toggledownfall give xp save cmd cmdlog console config"
@ -132,7 +132,7 @@ _msm() {
if [[ $COMP_CWORD == 3 && -d "$SETTINGS_JAR_STORAGE_PATH" ]]; then
options="$(ls -1 "$SETTINGS_JAR_STORAGE_PATH")"
fi
if [[ $COMP_CWORD == 4 && -d "$SETTINGS_JAR_STORAGE_PATH/${COMP_WORDS[3]}" ]]; then
options="$(find "$SETTINGS_JAR_STORAGE_PATH/${COMP_WORDS[3]}" -type f -name "*.jar" -exec basename {} \;)"
fi
@ -241,13 +241,13 @@ _msm() {
fi
;;
esac
fi
fi
;;
esac
fi
COMPREPLY=( $(compgen -W "${options}" -- ${current}) )
return 0
}

View File

@ -1,12 +1,12 @@
#
# Minecraft Server Manager Cron
#
#
# Backs up worlds, rolls logs, moves worlds in RAM to disk,
# starts crashed servers, and deletes old archives
#
#
# For more information visit the project home page:
# https://github.com/msmhq/msm
#
#
# Backs up all worlds for all servers at 2 minutes past 5 in the morning

View File

@ -12,4 +12,3 @@ ExecReload=/usr/local/bin/msm restart
[Install]
WantedBy=multi-user.target

View File

@ -12,4 +12,3 @@ ExecReload=/usr/local/bin/msm %i restart
[Install]
WantedBy=multi-user.target

View File

@ -16,7 +16,7 @@ function enable_init() {
install_log "Installing systemd service unit"
sudo wget ${UPDATE_URL}/init/msm.service \
-O /etc/systemd/system/msm.service
install_log "Enabling automatic startup and shutdown"
sudo systemctl enable msm.service
}
@ -28,7 +28,7 @@ function create_msm_directories() {
sudo mkdir -p "$msm_dir" || install_error "Couldn't create directory '$msm_dir'"
fi
sudo chown -R $msm_user:$msm_user "$msm_dir" || install_error "Couldn't change file ownership for '$msm_dir'"
if [ ! -d "/etc/init.d" ]; then
sudo mkdir -p "/etc/init.d/" || install_error "Couldn't create directory '/etc/init.d'"
fi

View File

@ -1,3 +1,3 @@
# MSM version file for CraftBukkit 1.2.0 and above
extends "minecraft/1.2.0"
extends "minecraft/1.2.0"

View File

@ -56,4 +56,4 @@ console_command SAVE_ON "save-on" \
console_command SAVE_OFF "save-off" \
"CONSOLE: Disabling level saving.."
console_command SAVE_ALL:10 "save-all" \
"CONSOLE: Save complete."
"CONSOLE: Save complete."

View File

@ -44,4 +44,4 @@ console_command SAVE_ON "save-on" \
console_command SAVE_OFF "save-off" \
"Turned off world auto-saving"
console_command SAVE_ALL:10 "save-all" \
"Saved the world"
"Saved the world"

View File

@ -9,4 +9,4 @@ minecraft/1.7.0
# CraftBukkit versions
craftbukkit/1.2.0
craftbukkit/1.3.0
craftbukkit/1.3.0