Skip to content

Commit

Permalink
feat: add systemd unit file for non docker users (#139)
Browse files Browse the repository at this point in the history
* This is a unit file, with a couple of caveats

YOu need to create the ddns user, and you need to create the ddns group, and obviously make sure you have the environments file.

* Update cloudflare.service

* Create cloudflare.service.env

* changed examples, but ip6 and ip4 are necessary if you want to resolve ipv6 not working

* Update cloudflare.service.env

Co-authored-by: favonia <favonia@gmail.com>
  • Loading branch information
symgryph and favonia authored Jul 28, 2022
1 parent 393f9f6 commit bbe48ae
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
19 changes: 19 additions & 0 deletions contrib/cloudflare.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[Unit]
Description=Cloudflare DNS Updater
Documentation=https://github.com/favonia/cloudflare-ddns/blob/main/README.markdown
Requires=network-online.target
After=network-online.target

[Install]
WantedBy=multi-user.target

[Service]
Type=simple
EnvironmentFile=/etc/cloudflare-ddns/cloudflare.service.env
Delegate=yes
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
Restart=always
User=ddns
ExecStart=/usr/local/bin/ddns
2 changes: 2 additions & 0 deletions contrib/cloudflare.service.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CF_API_TOKEN=YOUR-CLOUDFLARE-API-TOKEN
DOMAINS=example.org,www.example.org,example.io

0 comments on commit bbe48ae

Please sign in to comment.