From ad1dc772b6f82545a38f17b380c02cafb842d635 Mon Sep 17 00:00:00 2001 From: Nicolas Chan Date: Wed, 3 Mar 2021 22:19:00 -0800 Subject: [PATCH] Allow capital RCON --- backup.sh | 2 +- test/test.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backup.sh b/backup.sh index 7ac2fc2..5869296 100755 --- a/backup.sh +++ b/backup.sh @@ -223,7 +223,7 @@ execute-command () { ;; "tmux") tmux send-keys -t "$SCREEN_NAME" "$COMMAND" ENTER ;; - "rcon") rcon-command "$SCREEN_NAME" "$COMMAND" + "RCON"|"rcon") rcon-command "$SCREEN_NAME" "$COMMAND" ;; esac fi diff --git a/test/test.sh b/test/test.sh index ae1b0ce..e9e21b1 100755 --- a/test/test.sh +++ b/test/test.sh @@ -21,7 +21,7 @@ setUp () { screen -S "$SCREEN_TMP" -X stuff "cat > $TEST_TMP/screen-output\n" tmux new-session -d -s "$SCREEN_TMP" tmux send-keys -t "$SCREEN_TMP" "cat > $TEST_TMP/tmux-output" ENTER - sleep 0.5 + sleep 1 } tearDown () { @@ -145,7 +145,7 @@ test-rcon-interface () { test-rcon-interface-wrong-password () { TIMESTAMP="$(date +%F_%H-%M-%S --date="2021-01-01")" - OUTPUT="$(./backup.sh -w rcon -i "$TEST_TMP/server/world" -o "$TEST_TMP/backups" -s "localhost:$RCON_PORT:wrong$RCON_PASSWORD" -f "$TIMESTAMP" 2>&1)" + OUTPUT="$(./backup.sh -w RCON -i "$TEST_TMP/server/world" -o "$TEST_TMP/backups" -s "localhost:$RCON_PORT:wrong$RCON_PASSWORD" -f "$TIMESTAMP" 2>&1)" assertContains "$OUTPUT" "Wrong RCON password" }