-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop the app on the remote device when the user stops it from host machine #16
Comments
Hey @berkobob I will investigate about this. I guess it's not possible from the flutter side, but maybe we can do a trick and kill the app by app ID. I will let you know about possibilities. |
Any luck with this? I'm having to reboot the pi each time because I don't know the name (or number) of the process to kill. Thanks! |
Unfortunately, I didn't manage to check this issue. you can find the app ID with this command app_pid=$(pgrep -f "$app_command") app_command=/tmp/\${appName}/build/linux/arm64/debug/bundle/\${appName} If you want to work on this you can add this line in your custom_devices.json file after the line we lauch the app |
That works, thank you. |
@berkobob Can you share the final solution that you use? I want add a update for it |
I find the process ID as you showed me and then kill the process. |
Alright, If I get it right, you did this process manually right? You did not change the custom_devices.json file |
No, I didn't. |
Thanks @berkobob |
I think I may have found a solution. Adding the -tt flag to the ssh command forces the allocation of a PTY (pseudoterminal). This seems to ensure that the flutter-pi process on the target device receives a SIGHUP signal when disconnecting, which should allow it to shut down properly. |
I love your snapp_cli app, thank you. One issue, when I stop the app from my PC, the debugger disconnects but the app continues to run on the RPi. Is there a way to cleanly stop the app running? Thanks.
The text was updated successfully, but these errors were encountered: