Skip to content
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

Port occupancy issue #5

Open
ChaosLights opened this issue Mar 1, 2023 · 1 comment
Open

Port occupancy issue #5

ChaosLights opened this issue Mar 1, 2023 · 1 comment

Comments

@ChaosLights
Copy link

Hi, I follow the instructions and successfully had the code server setup on my rarspberry pi.
However there is an issue that bothers me a lot: When I enable the code-server.service, every time I reconnect the raspberry pi and my ipad using Type-C wire, the code server won’t work and the code server process created before is still running and occupying the 8080 port. I have to run “sudo fuser -k 8080/tcp” every time this happens. Is there any way that when I reconnect, it automatically starts a new code server process and kill the old one? Thank you

@scyilk
Copy link

scyilk commented Aug 6, 2024

If your iPad is new enough to run the Shortcuts app then it will have an "SSH and run command" action, you can make this run sudo fuser -k 8080/tcp. You can make it so that whenever the iPad "connects to a USB accessory" it will run this Shortcut. There is no native way to make sure this "USB accessory" is the Raspberry Pi, although I'm pretty sure an app called Powercuts has a way to check the MAC address of the accessory as an action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants