mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 14:01:57 -09:00
bandwidthd: Add systemd unit file and install it to run at startup.
Signed-off-by: Nathaniel Roach <nroach44@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
f3b41df5db
commit
f1b07c06fa
@@ -31,4 +31,14 @@ else
|
|||||||
BANDWIDTHD_CONF_OPTS += --with-sqlite-storage=false
|
BANDWIDTHD_CONF_OPTS += --with-sqlite-storage=false
|
||||||
endif
|
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))
|
$(eval $(autotools-package))
|
||||||
|
|||||||
11
package/bandwidthd/bandwidthd.service
Normal file
11
package/bandwidthd/bandwidthd.service
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user