From 79420876eeb88a04964bd833176b99330bab69cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hora=C8=9Biu=20Mlendea?= Date: Mon, 22 Apr 2024 18:15:53 +0300 Subject: [PATCH] gandi-dns-updater: Added new package --- pkg/gandi-dns-updater/PKGBUILD | 24 +++++++++++++++++++ .../gandi-dns-updater@.service | 10 ++++++++ .../gandi-dns-updater@.timer | 9 +++++++ 3 files changed, 43 insertions(+) create mode 100644 pkg/gandi-dns-updater/PKGBUILD create mode 100644 pkg/gandi-dns-updater/gandi-dns-updater@.service create mode 100644 pkg/gandi-dns-updater/gandi-dns-updater@.timer diff --git a/pkg/gandi-dns-updater/PKGBUILD b/pkg/gandi-dns-updater/PKGBUILD new file mode 100644 index 0000000..8fdaac5 --- /dev/null +++ b/pkg/gandi-dns-updater/PKGBUILD @@ -0,0 +1,24 @@ +pkgname=gandi-dns-updater +pkgver=1.0.0 +pkgrel=1 +pkgdesc="CLI utility for updating Gandi.net DNS records" +arch=('any') +url="https://github.com/hmlendea/${pkgname}" +license=('GPL') +depends=('curl') +optdepends=('bind: For IP address detection' + 'iputils: For IP address detection') +install= +source=(https://github.com/hmlendea/${pkgname}/releases/download/v${pkgver}/${pkgname}.sh) +sha512sums=('6edd982a60ed742306afe69078bd838a9cdfcc1678dee662381224705d0895ba959a5e351886f726cbe32e748ce5553f5c08e8224514460e50fe65d889f194d0') + +package() { + install -d "${pkgdir}/etc/${pkgname}" + install -d "${pkgdir}/usr/bin" + install -d "${pkgdir}/usr/lib/systemd/system" + + install -m755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}" + install "${srcdir}/../${pkgname}@.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}@.service" + install "${srcdir}/../${pkgname}@.timer" "${pkgdir}/usr/lib/systemd/system/${pkgname}@.timer" + touch "${pkgdir}/etc/${pkgname}/api-key" +} diff --git a/pkg/gandi-dns-updater/gandi-dns-updater@.service b/pkg/gandi-dns-updater/gandi-dns-updater@.service new file mode 100644 index 0000000..71ee6e8 --- /dev/null +++ b/pkg/gandi-dns-updater/gandi-dns-updater@.service @@ -0,0 +1,10 @@ +[Unit] +Description=Update the Gandi.net DNS record (%i) +After=local-fs.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/gandi-dns-updater %i + +[Install] +WantedBy=multi-user.target diff --git a/pkg/gandi-dns-updater/gandi-dns-updater@.timer b/pkg/gandi-dns-updater/gandi-dns-updater@.timer new file mode 100644 index 0000000..4a495be --- /dev/null +++ b/pkg/gandi-dns-updater/gandi-dns-updater@.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Update the Gandi.net DNS record (%i) periodically + +[Timer] +OnBootSec=5min +OnUnitActiveSec=5min + +[Install] +WantedBy=multi-user.target