Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions host/src/pack/dpkg/opt/cfc/mwc/bin/condition_resume_civ.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ function resume_civ()

function toggle_status()
{
echo "Send QMP: toggle_instance_status, value=1"
echo "Send QMP: toggle-instance-status, value=1"
local out
echo "{ \"execute\": \"toggle_instance_status\", \"arguments\": { \"value\": 1 } }" >&4
echo "{ \"execute\": \"toggle-instance-status\", \"arguments\": { \"value\": 1 } }" >&4
read -u 5 -t 1 -r out && echo "OUTPUT: $out"
}

Expand Down
9 changes: 9 additions & 0 deletions host/src/pack/dpkg/opt/cfc/mwc/bin/pause_civ.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ function connect_qmp()
return -1
fi
}
function toggle_status()
{
echo "Send QMP: toggle-instance-status, value=0"
local out
echo "{ \"execute\": \"toggle-instance-status\", \"arguments\": { \"value\": 0 } }" >&4
read -u 5 -t 1 -r out && echo "OUTPUT: $out"
}

function pause_civ()
{
Expand All @@ -69,6 +76,8 @@ function pause_civ()

connect_qmp || exit -1
if [ -z "$(pidof mwc_launcher)" ] && [ -z "$(pgrep -ax adb | grep -v "fork-server")" ] && [ -z "$(pidof startapp)" ]; then
echo "Try to toggle civ ..."
toggle_status || exit -1
echo "Try to pause civ ..."
pause_civ || exit -1
echo "Pause CIV executed."
Expand Down
4 changes: 2 additions & 2 deletions host/src/pack/dpkg/opt/cfc/mwc/bin/resume_civ.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ function resume_civ()

function toggle_status()
{
echo "Send QMP: toggle_instance_status, value=1"
echo "Send QMP: toggle-instance-status, value=1"
local out
echo "{ \"execute\": \"toggle_instance_status\", \"arguments\": { \"value\": 1 } }" >&4
echo "{ \"execute\": \"toggle-instance-status\", \"arguments\": { \"value\": 1 } }" >&4
read -u 5 -t 1 -r out && echo "OUTPUT: $out"
}

Expand Down