This repository was archived by the owner on Jun 1, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
host/src/pack/dpkg/opt/cfc/mwc/bin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,9 +82,9 @@ function resume_civ()
8282
8383function toggle_status()
8484{
85- echo " Send QMP: toggle_instance_status , value=1"
85+ echo " Send QMP: toggle-instance-status , value=1"
8686 local out
87- echo " { \" execute\" : \" toggle_instance_status \" , \" arguments\" : { \" value\" : 1 } }" >&4
87+ echo " { \" execute\" : \" toggle-instance-status \" , \" arguments\" : { \" value\" : 1 } }" >&4
8888 read -u 5 -t 1 -r out && echo " OUTPUT: $out "
8989}
9090
Original file line number Diff line number Diff line change @@ -49,6 +49,13 @@ function connect_qmp()
4949 return -1
5050 fi
5151}
52+ function toggle_status()
53+ {
54+ echo " Send QMP: toggle-instance-status, value=0"
55+ local out
56+ echo " { \" execute\" : \" toggle-instance-status\" , \" arguments\" : { \" value\" : 0 } }" >&4
57+ read -u 5 -t 1 -r out && echo " OUTPUT: $out "
58+ }
5259
5360function pause_civ()
5461{
@@ -69,6 +76,8 @@ function pause_civ()
6976
7077connect_qmp || exit -1
7178if [ -z " $( pidof mwc_launcher) " ] && [ -z " $( pgrep -ax adb | grep -v " fork-server" ) " ] && [ -z " $( pidof startapp) " ]; then
79+ echo " Try to toggle civ ..."
80+ toggle_status || exit -1
7281 echo " Try to pause civ ..."
7382 pause_civ || exit -1
7483 echo " Pause CIV executed."
Original file line number Diff line number Diff line change @@ -69,9 +69,9 @@ function resume_civ()
6969
7070function toggle_status()
7171{
72- echo " Send QMP: toggle_instance_status , value=1"
72+ echo " Send QMP: toggle-instance-status , value=1"
7373 local out
74- echo " { \" execute\" : \" toggle_instance_status \" , \" arguments\" : { \" value\" : 1 } }" >&4
74+ echo " { \" execute\" : \" toggle-instance-status \" , \" arguments\" : { \" value\" : 1 } }" >&4
7575 read -u 5 -t 1 -r out && echo " OUTPUT: $out "
7676}
7777
You can’t perform that action at this time.
0 commit comments