recipes-bsp: added storage-info as systemd service
BugzID: 75350 Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
This commit is contained in:
parent
96c52172f7
commit
842e337481
|
|
@ -0,0 +1,42 @@
|
|||
SUMMARY = "Storage Information Tool"
|
||||
SECTION = "base"
|
||||
LICENSE = "GPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=81438338854bd7a09cb97215f36db46b"
|
||||
|
||||
SRC_URI = "git://gitlab.com/netmodule/tools/storage-info.git;protocol=ssh;user=git;branch=develop"
|
||||
SRCREV = "${AUTOREV}"
|
||||
SRC_URI_append = " \
|
||||
file://storage-info.conf \
|
||||
file://storage-info.service \
|
||||
"
|
||||
|
||||
PV = "0.0.1+git${SRCPV}"
|
||||
|
||||
|
||||
DEPENDS_append = " libnmapp"
|
||||
|
||||
inherit systemd
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
B = "${S}/build"
|
||||
|
||||
SYSTEMD_SERVICE_${PN} = "storage-info.service"
|
||||
|
||||
FILES_${PN} += " \
|
||||
${bindir}/storage-info \
|
||||
${systemd_system_unitdir}/storage-info.service \
|
||||
${sysconfdir}/storage/storage-info.conf \
|
||||
"
|
||||
|
||||
# build variables for the target (rest is default)
|
||||
EXTRA_OEMAKE_append = " 'BUILD_TARGET=target' 'BUILD_CONFIG=rls' 'SYSROOT=${STAGING_DIR_TARGET}'"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 755 ${B}/rls/target/${BPN} ${D}${bindir}
|
||||
install -d ${D}${sysconfdir}/storage
|
||||
install -m 644 ${WORKDIR}/${BPN}.conf ${D}${sysconfdir}/storage/
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
install -m 644 ${WORKDIR}/${BPN}.service ${D}${systemd_system_unitdir}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Default settings for storage-info
|
||||
# for details run storage-info --help
|
||||
|
||||
INTERVAL="-i 3600000"
|
||||
TARGET_FILE="-f /run/storage/storage0.config"
|
||||
LOGGER_CONFIG="--loglevel=6,evtloop.5,info-collector.6,info-writer.6"
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=Storage Information daemon
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
EnvironmentFile=-/etc/default/storage-info.conf
|
||||
ExecStart=/usr/bin/storage-info $INTERVAL $TARGET_FILE -d -p /run/storage-info.pid $LOGGER_CONFIG
|
||||
PIDFile=/run/storage-info.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Reference in New Issue