mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Added three missing server username lazy loads.
This commit is contained in:
parent
381b627bb6
commit
cbb8d2f616
4
init/msm
4
init/msm
@ -322,6 +322,8 @@ world_backup() {
|
|||||||
local server_id="${WORLD_SERVER_ID[$1]}"
|
local server_id="${WORLD_SERVER_ID[$1]}"
|
||||||
local containing_dir="$(dirname "${WORLD_PATH[$1]}")"
|
local containing_dir="$(dirname "${WORLD_PATH[$1]}")"
|
||||||
local dir_name="$(basename "${WORLD_PATH[$1]}")"
|
local dir_name="$(basename "${WORLD_PATH[$1]}")"
|
||||||
|
|
||||||
|
server_property "$server_id" USERNAME
|
||||||
as_user "${SERVER_USERNAME[$server_id]}" "mkdir -p \"${WORLD_BACKUP_PATH[$1]}\" && cd \"$containing_dir\" && zip -rq \"${WORLD_BACKUP_PATH[$1]}/${file_name}\" \"${dir_name}\""
|
as_user "${SERVER_USERNAME[$server_id]}" "mkdir -p \"${WORLD_BACKUP_PATH[$1]}\" && cd \"$containing_dir\" && zip -rq \"${WORLD_BACKUP_PATH[$1]}/${file_name}\" \"${dir_name}\""
|
||||||
|
|
||||||
echo "Done."
|
echo "Done."
|
||||||
@ -2747,6 +2749,7 @@ command_server_cmd() {
|
|||||||
command_server_cmdlog() {
|
command_server_cmdlog() {
|
||||||
if server_is_running "$1"; then
|
if server_is_running "$1"; then
|
||||||
server_property "$1" LOG_PATH
|
server_property "$1" LOG_PATH
|
||||||
|
server_property "$1" USERNAME
|
||||||
|
|
||||||
echo "Now watching logs (press Ctrl+C to exit):"
|
echo "Now watching logs (press Ctrl+C to exit):"
|
||||||
server_eval "$1" "${*:2}"
|
server_eval "$1" "${*:2}"
|
||||||
@ -2761,6 +2764,7 @@ command_server_cmdlog() {
|
|||||||
# $1: The server ID
|
# $1: The server ID
|
||||||
command_server_console() {
|
command_server_console() {
|
||||||
if server_is_running "$1"; then
|
if server_is_running "$1"; then
|
||||||
|
server_property "$1" USERNAME
|
||||||
as_user "${SERVER_USERNAME[$1]}" "screen -r ${SERVER_SCREEN_NAME[$1]}"
|
as_user "${SERVER_USERNAME[$1]}" "screen -r ${SERVER_SCREEN_NAME[$1]}"
|
||||||
else
|
else
|
||||||
error_exit SERVER_STOPPED "Server \"${SERVER_NAME[$1]}\" is not running."
|
error_exit SERVER_STOPPED "Server \"${SERVER_NAME[$1]}\" is not running."
|
||||||
|
Loading…
Reference in New Issue
Block a user