Skip to content

Commit

Permalink
Merge pull request #28 from hmlendea/gandi-dns-updater
Browse files Browse the repository at this point in the history
gandi-dns-updater: Added the package
  • Loading branch information
hmlendea authored Apr 22, 2024
2 parents d324e39 + 7942087 commit 145a83d
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pkg/gandi-dns-updater/PKGBUILD
Original file line number Diff line number Diff line change
@@ -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"
}
10 changes: 10 additions & 0 deletions pkg/gandi-dns-updater/gandi-dns-updater@.service
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions pkg/gandi-dns-updater/gandi-dns-updater@.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Update the Gandi.net DNS record (%i) periodically

[Timer]
OnBootSec=5min
OnUnitActiveSec=5min

[Install]
WantedBy=multi-user.target

0 comments on commit 145a83d

Please sign in to comment.