andrewdavidmackenzie / pigg

Raspberry Pi GPIO GUI
Apache License 2.0
102 stars 5 forks source link

Allow piglet to be installed as a system service #224

Open andrewdavidmackenzie opened 2 weeks ago

andrewdavidmackenzie commented 2 weeks ago

Add a CLI option that installs piglet as a background system service.

Log the nodeId to use to connect to this instance, plus other useful info. Log that into to a file in a fixed locaiton.

Addition to: https://github.com/andrewdavidmackenzie/pigg/issues/106

andrewdavidmackenzie commented 2 weeks ago

Code can be copied from https://github.com/andrewdavidmackenzie/pingr/tree/master/wimon, using the service-manager crate

andrewdavidmackenzie commented 7 hours ago

Have CLI invocation of piglet detect that the service is already running, and if it is:

Thus making it easy for someone to find the nodeId to connect to without knowing details of system logs and file locations. They just need to try to run piglet (user or su mode) and it will tell them it's already running and what Id to use to connect to it.