Closed masoncfrancis closed 7 months ago
Thank you very much! I refactored a little bit of code and merged it :)
Also the code always runs the systemd service as root, I added some code to lookup the user invoking sudo in 30e02c1. Maybe have a look at your instance to make sure that it is not ran as root
Your changes look good. Thanks for accepting the pr!
For now, I only implemented code to install the software as a service for systems using systemd because that is very common in most linux distributions. Right now it doesn't support Windows or Mac. With that said, here is how the code works:
The user passes in the --install-service flag. The sofware:
/lib/systemd/system/gokapi.service
It is important to note that the systemd service file points to the path of the gokapi executable we are using to run this
The user can also uninstall the systemd service by using the --uninstall-service flag. When they do that, the software:
/lib/systemd/system
I added a section of docs as well, let me know your thoughts.
I will admit, I wasn't entirely sure how your tests work and had issues getting them to work on my system, so I only touched the flag tests but not much else.