From: Nathaniel Roach <nroach44@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] bandwidthd: Add systemd unit file and install it to run at startup.
Date: Sun, 11 Jan 2015 13:31:34 +0800 [thread overview]
Message-ID: <1420954296-27101-1-git-send-email-nroach44@gmail.com> (raw)
Signed-off-by: Nathaniel Roach <nroach44@gmail.com>
---
package/bandwidthd/bandwidthd.mk | 10 ++++++++++
package/bandwidthd/bandwidthd.service | 11 +++++++++++
2 files changed, 21 insertions(+)
create mode 100644 package/bandwidthd/bandwidthd.service
diff --git a/package/bandwidthd/bandwidthd.mk b/package/bandwidthd/bandwidthd.mk
index ca991f9..2773490 100644
--- a/package/bandwidthd/bandwidthd.mk
+++ b/package/bandwidthd/bandwidthd.mk
@@ -31,4 +31,14 @@ else
BANDWIDTHD_CONF_OPTS += --with-sqlite-storage=false
endif
+define BANDWIDTHD_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -D -m 644 package/bandwidthd/bandwidthd.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/bandwidthd.service
+
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+
+ ln -sf /usr/lib/systemd/system/bandwidthd.service \
+ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/bandwidthd.service
+endef
+
$(eval $(autotools-package))
diff --git a/package/bandwidthd/bandwidthd.service b/package/bandwidthd/bandwidthd.service
new file mode 100644
index 0000000..9c03d42
--- /dev/null
+++ b/package/bandwidthd/bandwidthd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Bandwidth usage monitor and reporter
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/bandwidthd
+PIDFile=/var/run/bandwidthd.pid
+
+[Install]
+WantedBy=multi-user.target
--
2.1.4
next reply other threads:[~2015-01-11 5:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-11 5:31 Nathaniel Roach [this message]
2015-01-11 5:31 ` [Buildroot] [PATCH] postgresql: bump version to 9.4.0 Nathaniel Roach
2015-01-12 11:37 ` Thomas Petazzoni
2015-01-11 5:31 ` [Buildroot] [PATCH] bind: Add systemd unit file and install it to run at startup Nathaniel Roach
2015-01-12 21:22 ` Thomas Petazzoni
2015-01-11 19:45 ` [Buildroot] [PATCH] bandwidthd: " Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1420954296-27101-1-git-send-email-nroach44@gmail.com \
--to=nroach44@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.