From bbe48ae14ca36c1e6dac877550211af384f17f87 Mon Sep 17 00:00:00 2001 From: Thomas <4530798+symgryph@users.noreply.github.com> Date: Wed, 27 Jul 2022 20:45:41 -0400 Subject: [PATCH] feat: add systemd unit file for non docker users (#139) * 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 --- contrib/cloudflare.service | 19 +++++++++++++++++++ contrib/cloudflare.service.env | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 contrib/cloudflare.service create mode 100644 contrib/cloudflare.service.env diff --git a/contrib/cloudflare.service b/contrib/cloudflare.service new file mode 100644 index 00000000..f1e80f73 --- /dev/null +++ b/contrib/cloudflare.service @@ -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 diff --git a/contrib/cloudflare.service.env b/contrib/cloudflare.service.env new file mode 100644 index 00000000..9a24c869 --- /dev/null +++ b/contrib/cloudflare.service.env @@ -0,0 +1,2 @@ +CF_API_TOKEN=YOUR-CLOUDFLARE-API-TOKEN +DOMAINS=example.org,www.example.org,example.io