mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Merge pull request #431 from Next-Door-Tech/cleanup
Very minor - clean up extraneous whitespace
This commit is contained in:
@ -21,14 +21,14 @@ MSM="${MSM_SCRIPT:-/etc/init.d/msm}"
|
|||||||
|
|
||||||
_msm() {
|
_msm() {
|
||||||
source "$MSM"
|
source "$MSM"
|
||||||
|
|
||||||
local base current options
|
local base current options
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
|
|
||||||
current="${COMP_WORDS[$COMP_CWORD]}"
|
current="${COMP_WORDS[$COMP_CWORD]}"
|
||||||
|
|
||||||
manager_property SERVER_STORAGE_PATH
|
manager_property SERVER_STORAGE_PATH
|
||||||
|
|
||||||
if [[ $COMP_CWORD == 1 ]]; then
|
if [[ $COMP_CWORD == 1 ]]; then
|
||||||
if [ -d "$SETTINGS_SERVER_STORAGE_PATH" ]; then
|
if [ -d "$SETTINGS_SERVER_STORAGE_PATH" ]; then
|
||||||
local servers="$(ls -1 "$SETTINGS_SERVER_STORAGE_PATH")"
|
local servers="$(ls -1 "$SETTINGS_SERVER_STORAGE_PATH")"
|
||||||
@ -80,9 +80,9 @@ _msm() {
|
|||||||
server_get_id "${COMP_WORDS[1]}"
|
server_get_id "${COMP_WORDS[1]}"
|
||||||
local sid="$RETURN"
|
local sid="$RETURN"
|
||||||
fi
|
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_WORDS[1]}" == "all" ]] || [ -e "$server_path" ]; then
|
||||||
if [[ $COMP_CWORD == 2 ]]; 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"
|
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
|
if [[ $COMP_CWORD == 3 && -d "$SETTINGS_JAR_STORAGE_PATH" ]]; then
|
||||||
options="$(ls -1 "$SETTINGS_JAR_STORAGE_PATH")"
|
options="$(ls -1 "$SETTINGS_JAR_STORAGE_PATH")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $COMP_CWORD == 4 && -d "$SETTINGS_JAR_STORAGE_PATH/${COMP_WORDS[3]}" ]]; then
|
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 {} \;)"
|
options="$(find "$SETTINGS_JAR_STORAGE_PATH/${COMP_WORDS[3]}" -type f -name "*.jar" -exec basename {} \;)"
|
||||||
fi
|
fi
|
||||||
@ -241,13 +241,13 @@ _msm() {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
COMPREPLY=( $(compgen -W "${options}" -- ${current}) )
|
COMPREPLY=( $(compgen -W "${options}" -- ${current}) )
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
6
cron/msm
6
cron/msm
@ -1,12 +1,12 @@
|
|||||||
#
|
#
|
||||||
# Minecraft Server Manager Cron
|
# Minecraft Server Manager Cron
|
||||||
#
|
#
|
||||||
# Backs up worlds, rolls logs, moves worlds in RAM to disk,
|
# Backs up worlds, rolls logs, moves worlds in RAM to disk,
|
||||||
# starts crashed servers, and deletes old archives
|
# starts crashed servers, and deletes old archives
|
||||||
#
|
#
|
||||||
# For more information visit the project home page:
|
# For more information visit the project home page:
|
||||||
# https://github.com/msmhq/msm
|
# https://github.com/msmhq/msm
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
# Backs up all worlds for all servers at 2 minutes past 5 in the morning
|
# Backs up all worlds for all servers at 2 minutes past 5 in the morning
|
||||||
|
@ -12,4 +12,3 @@ ExecReload=/usr/local/bin/msm restart
|
|||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
@ -12,4 +12,3 @@ ExecReload=/usr/local/bin/msm %i restart
|
|||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ function enable_init() {
|
|||||||
install_log "Installing systemd service unit"
|
install_log "Installing systemd service unit"
|
||||||
sudo wget ${UPDATE_URL}/init/msm.service \
|
sudo wget ${UPDATE_URL}/init/msm.service \
|
||||||
-O /etc/systemd/system/msm.service
|
-O /etc/systemd/system/msm.service
|
||||||
|
|
||||||
install_log "Enabling automatic startup and shutdown"
|
install_log "Enabling automatic startup and shutdown"
|
||||||
sudo systemctl enable msm.service
|
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'"
|
sudo mkdir -p "$msm_dir" || install_error "Couldn't create directory '$msm_dir'"
|
||||||
fi
|
fi
|
||||||
sudo chown -R $msm_user:$msm_user "$msm_dir" || install_error "Couldn't change file ownership for '$msm_dir'"
|
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
|
if [ ! -d "/etc/init.d" ]; then
|
||||||
sudo mkdir -p "/etc/init.d/" || install_error "Couldn't create directory '/etc/init.d'"
|
sudo mkdir -p "/etc/init.d/" || install_error "Couldn't create directory '/etc/init.d'"
|
||||||
fi
|
fi
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
# MSM version file for CraftBukkit 1.2.0 and above
|
# MSM version file for CraftBukkit 1.2.0 and above
|
||||||
|
|
||||||
extends "minecraft/1.2.0"
|
extends "minecraft/1.2.0"
|
||||||
|
@ -56,4 +56,4 @@ console_command SAVE_ON "save-on" \
|
|||||||
console_command SAVE_OFF "save-off" \
|
console_command SAVE_OFF "save-off" \
|
||||||
"CONSOLE: Disabling level saving.."
|
"CONSOLE: Disabling level saving.."
|
||||||
console_command SAVE_ALL:10 "save-all" \
|
console_command SAVE_ALL:10 "save-all" \
|
||||||
"CONSOLE: Save complete."
|
"CONSOLE: Save complete."
|
||||||
|
@ -44,4 +44,4 @@ console_command SAVE_ON "save-on" \
|
|||||||
console_command SAVE_OFF "save-off" \
|
console_command SAVE_OFF "save-off" \
|
||||||
"Turned off world auto-saving"
|
"Turned off world auto-saving"
|
||||||
console_command SAVE_ALL:10 "save-all" \
|
console_command SAVE_ALL:10 "save-all" \
|
||||||
"Saved the world"
|
"Saved the world"
|
||||||
|
@ -9,4 +9,4 @@ minecraft/1.7.0
|
|||||||
|
|
||||||
# CraftBukkit versions
|
# CraftBukkit versions
|
||||||
craftbukkit/1.2.0
|
craftbukkit/1.2.0
|
||||||
craftbukkit/1.3.0
|
craftbukkit/1.3.0
|
||||||
|
Reference in New Issue
Block a user