Closed Lollaskates closed 1 year ago
Wow, not one but two people decided to tackle this while I was on vacation! So we have a competing PR here that takes a slightly different approach: https://github.com/kchristensen/udm-le/pull/71
So as I've mentioned previously I'm not currently using my UDM but I do have it sitting on my test bench so I can help with a little testing, but I think before either of these approaches gets merged we're going to have to solicit some help from others for all the various cases you outlined above.
First off I like your use of the systemd timer (I didn't even know this was a thing, very handy) and ditching the on_boot.d dependency. I feel like this is the way to go because reduces the complexity of the install process.
However, looking at the other PR I like that approach for sourcing the lego binary vs forcing people to do that bit manually.
How would you feel about yanking that bit over into this PR?
I'm on the fence about maintaining the legacy support that the other PR has. On one hand it's nice for people who don't want to upgrade, however I feel like it's just delaying the inevitable, because people really SHOULD be upgrading to 2.x.
I think the goal for this thing moving forward should be:
1) Maintaining the lightest touch as far as OS system changes to try and mitigate chance of breakage on updates. 2) Minimizing the amount of steps necessary for initial installation, since the majority of the issues people raise are generally because the userbase does seem to have a fair amount of people who aren't super unix savvy.
Also not a huge deal but we're also going to need some README updates but I can swing that after we can solidify this PR and get some user feedback.
I'll drop a note in the other PR to have a peek here and we can see what other people think.
Thanks so much for taking the time to do this, I have been too busy to get around to it!
That all sounds good to me!
install_lego
command switch to force install the configured lego version in udm-le.envinitial
command switch, and install if its not presentNote: I'm still placing lego within the managed /data/udm-le folder, as placing it in /usr/local/bin would conflict with the apt package placement of the binary. I think it's best to keep everything as light touch and encapsulated as possible.
For what it's worth, the lego package installs to /usr/bin
:
root@DreamMachinePro:~# apt-file list lego
lego: /usr/bin/lego
lego: /usr/share/doc/lego/changelog.Debian.arm64.gz
lego: /usr/share/doc/lego/changelog.Debian.gz
lego: /usr/share/doc/lego/changelog.gz
lego: /usr/share/doc/lego/copyright
/usr/local/bin
is typically used for installs not performed by package managers.
Ok cool, mind resolving this merge conflict and I'll get this merged into the development branch? After that I can clean up a few things and I can cut a beta release or something and we can see how it's working for everyone else.
Conflicts resolved - feel free to take it from here post-merge @potto007. I'm not sure if /usr/ is persistent, which was part of the reasoning for keeping lego
within /data/udm-le. If it is, you or @kchristensen can move things around or refactor as needed. Enjoy!
Awesome I'm going to merge this now and hack on some documentation and what not tonight. Feel free to PR up anything as y'all see fit into the dev branch!
I just yolo'd a bunch of changes into the development branch, primarily formatting and README updates, that I haven't tested as of yet. Let me know if you run into anything weird.
Had a bit to test, and pushed up some fixes. Seems to work, although the captive portal stuff doesn't seem to be working but I don't use it and don't have time to dig into it at the moment.
Hi, I've done a rather substantial overhaul on the structure and function of udm-le to better support UnifiOS 2.x
I have tested this with cloudflare for both ./udm-le initial, renew, and the timer invocation. However, there are a few things left that need to be tested (and potentially adjusted):
Some Notes: The udm-le service should not be started directly. It's merely a registered service and instead, udm-le.timer is what actually triggers the service to run. You can look at the status of the service and associated timer with
systemctl status udm-le.service
andsystemctl status udm-le.timer
respectively.If you need to check the output of recent automated renewal attempts by the systemd service, you can check the log output with
journalctl -u udm-le
. Example output:Helpful systemctl commands if you aren't familiar:
Example status of an active timer:
Hope this helps!