summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD40
-rw-r--r--watchdog.logrotate3
-rw-r--r--watchdog.systemd10
4 files changed, 71 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b7fe38561416
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = watchdog
+ pkgdesc = Watchdog daemon
+ pkgver = 5.15
+ pkgrel = 1
+ url = http://sourceforge.net/projects/watchdog
+ arch = x86_64
+ license = GPL
+ depends = glibc
+ backup = etc/watchdog.conf
+ source = http://downloads.sourceforge.net/watchdog/watchdog-5.15.tar.gz
+ source = watchdog.systemd
+ source = watchdog.logrotate
+ md5sums = 678c32f6f35a0492c9c1b76b4aa88828
+ md5sums = 06677f094ec76b7fbb7b0db141209dec
+ md5sums = 6430e9071aa724918b47f8c3b0412a5f
+
+pkgname = watchdog
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9c8938407b3e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 310007 2017-11-15 14:11:34Z foutrelis $
+# Maintainer: Thomas Bächler <thomas@archlinux.org>
+
+pkgname=watchdog
+pkgver=5.15
+pkgrel=1
+pkgdesc="Watchdog daemon"
+arch=(x86_64)
+url="http://sourceforge.net/projects/watchdog"
+license=('GPL')
+depends=('glibc')
+backup=(etc/watchdog.conf)
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ watchdog.systemd
+ watchdog.logrotate)
+md5sums=('678c32f6f35a0492c9c1b76b4aa88828'
+ '06677f094ec76b7fbb7b0db141209dec'
+ '6430e9071aa724918b47f8c3b0412a5f')
+
+build() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+
+ ./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --mandir=/usr/share/man \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --with-pidfile=/run/watchdog.pid \
+ --with-ka_pidfile=/run/wd_keepalive.pid
+
+ make
+}
+
+package() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+ make install DESTDIR="${pkgdir}"
+ install -D -m644 "${srcdir}"/watchdog.systemd "${pkgdir}"/usr/lib/systemd/system/watchdog.service
+ install -D -m644 "${srcdir}"/watchdog.logrotate "${pkgdir}"/etc/logrotate.d/watchdog
+}
diff --git a/watchdog.logrotate b/watchdog.logrotate
new file mode 100644
index 000000000000..060ab56a5f69
--- /dev/null
+++ b/watchdog.logrotate
@@ -0,0 +1,3 @@
+/var/log/watchdog/* {
+ missingok
+}
diff --git a/watchdog.systemd b/watchdog.systemd
new file mode 100644
index 000000000000..4bd08f95ca91
--- /dev/null
+++ b/watchdog.systemd
@@ -0,0 +1,10 @@
+[Unit]
+Description=Watchdog Daemon
+
+[Service]
+Type=forking
+PIDFile=/run/watchdog.pid
+ExecStart=/usr/bin/watchdog
+
+[Install]
+WantedBy=multi-user.target