summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/watchdog/watchdog-config.bb
blob: 17151ced5eca8508d9ae606ea739c6a1d3806ba5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
SUMMARY = "Software watchdog"
DESCRIPTION = "Watchdog is a daemon that checks if your system is still \
working. If programs in user space are not longer executed it will reboot \
the system."
HOMEPAGE = "http://watchdog.sourceforge.net/"
BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194"

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

SRC_URI = " \
    file://watchdog.default \
    file://watchdog.conf \
"

S = "${WORKDIR}/sources"
UNPACKDIR = "${S}"

# The default value is 60 seconds when null.
WATCHDOG_TIMEOUT ??= ""

do_install() {
    install -Dm 0644 ${UNPACKDIR}/watchdog.default ${D}${sysconfdir}/default/watchdog
    install -Dm 0644 ${UNPACKDIR}/watchdog.conf ${D}${sysconfdir}/watchdog.conf

    if [ -n "${WATCHDOG_TIMEOUT}" ]; then
        echo "watchdog-timeout = ${WATCHDOG_TIMEOUT}" >> ${D}/etc/watchdog.conf
    fi
}