Browse Source

fix: handle telnet response during stop process

pull/4590/head
Intel44 1 year ago
parent
commit
39fb0e30ac
  1. 8
      lgsm/modules/command_stop.sh

8
lgsm/modules/command_stop.sh

@ -268,11 +268,15 @@ fn_stop_graceful_sm_telnet() {
}
spawn telnet '"${telnetip}"' '"${telnetport}"'
expect {
"session." { send "saveworld 1\r" }
"Hello:" { send "saveworld 1\r" }
default abort
}
expect {
"session." { send "quit 1\r" }
"the world is saved." { send "quit 1\r" }
default abort
}
expect {
"World is closing..." {}
default abort
}
expect { eof }

Loading…
Cancel
Save