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
Add systemd unit file for non docker users. #139
Conversation
YOu need to create the ddns user, and you need to create the ddns group, and obviously make sure you have the environments file.
This is a unit file, with a couple of caveats
@symgryph Thanks. The systemd file looks great! I left a few comments and have two additional questions:
Again, thanks for your contribution. ❤️ |
This is my second account, just an update. I will include requested env and update my systemd configuration. I might even secure it a bit more. |
Did you want a .md doc explaining how to use the systemd portion? |
That would be helpful. Thanks. 🙏 |
Any update on this PR :) ? |
Codecov Report
@@ Coverage Diff @@
## main #139 +/- ##
=======================================
Coverage 83.31% 83.31%
=======================================
Files 27 27
Lines 1576 1576
=======================================
Hits 1313 1313
Misses 257 257
Partials 6 6
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
I will be working on this tonight. Sorry for the delay! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hopefully these are sufficient.....
@symgryph Thanks. I will check this PR on
|
The delegate is for container workloads prevents cgroup access to rtc. It's probably not necessary.
The nofiles gets around stupid systemd 1024 nprocs. It might be fine to change these, I just got sick of things dying due to stupid systemdisms. They could be set but afaik this has the effect of just making them the same as the ones in the sysctl.conf for the system a more sane default.
Sincerely
Thomas Munn
…________________________________
From: favonia ***@***.***>
Sent: Wednesday, July 6, 2022 8:05:39 PM
To: favonia/cloudflare-ddns ***@***.***>
Cc: Thomas ***@***.***>; Mention ***@***.***>
Subject: Re: [favonia/cloudflare-ddns] Add systemd unit file for non docker users. (PR #139)
@symgryph<https://github.com/symgryph> Thanks. I will check this PR on Friday. In the meanwhile, I wonder if you could help me understand why we need these?
Delegate=yes
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
—
Reply to this email directly, view it on GitHub<#139 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABCSE3XAHBQKOP4TZJNLJGDVSYNNHANCNFSM5TB6PEEA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I'm merging this. And then, I'm going to list you as a contributor, but in a different PR so that you can "approve". (You cannot approve your own PR.) |
…e ipv6 not working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to remove the 'ip4/ip6' but it does work here.
I played with it last night and I found a better way to specify just IPv6
or IPv4. I misread your documentation. Also is there a way to actually
specify these environment variables in a file? I was trying to write an
open RC version and it's very hard to set environment variables inside of
OpenRC scripts.
…On Monday, July 11, 2022, favonia ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In contrib/cloudflare.service.env
<#139 (comment)>
:
> +IP6,IP4
+DOMAINS=<your domains here>
+CF_API_TOKEN=<your cloudflare bearer token>
IP4, IP6 worked on my config, unless it needs changing...I needed both
ipv4 and ipv6
I believe it works fine but probably *not* because of the reasons you
think of. First of all, the tool does not read or check environment
variables named IP4, IP6, or IP4,IP6 at all. By default, it simply works
for both IP4 and IP6. You actually have to manually disable it (either via
IP4_PROVIDER=none or IP6_PROVIDER=none, or using IP4_DOMAINS instead of
DOMAINS). Therefore, it works not because of this line.
My further concern is that, according to the systemd documentation, each
line should have the form key=value, and the line IP4,IP6 does not seem
to fit into that form. That's what I meant by "seems to be ill-formed".
As a way to move forward, could you possibly try removing the line from
your configuration and see whether it would actually just work? If so, then
we can remove the line with absolute confidence.
—
Reply to this email directly, view it on GitHub
<#139 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCSE3U2MJE5QOQ3TK77XY3VTQJF3ANCNFSM5TB6PEEA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
-----------------------
Two Wheels Good, Four Wheels Bad
|
Out of curiosity, what is the better way? Also, does this mean we should remove
There are some design difficulties---some environment variables are actually not directly read by this tool. However, I don't immediately see the difficulty of doing what you want in OpenRC. An OpenRC service script is a shell script. I believe you can create an environment file as follows: export CF_API_TOKEN=...
export DOMAINS=... And then, |
I am going to merge this PR first. |
Here is my modified configuration, just use the following directives, no need for ip4 or ip6: I just wanted ipv6 in one of my use cases:
export PGID=1001
export PUID=1001
export CF_API_TOKEN=“My Token"
export IP6_DOMAINS=“my.host.com"
export IP4_PROVIDER="none"
… On Jul 11, 2022, at 4:54 PM, favonia ***@***.***> wrote:
what
|
I'm glad it worked. Let me know if there's some problem. |
No description provided.