[Buildroot] [PATCH 15/38] neard: systemd support
Maxime Hadjinlian
maxime.hadjinlian at gmail.com
Mon Jul 13 18:01:29 UTC 2015
Hi Alex, all
On Sat, May 23, 2015 at 12:05 PM, Alex Suykov <alex.suykov at gmail.com> wrote:
> Signed-off-by: Alex Suykov <alex.suykov at gmail.com>
> ---
> package/neard/neard.mk | 8 ++++++++
> package/neard/neard.service | 10 ++++++++++
> 2 files changed, 18 insertions(+)
> create mode 100644 package/neard/neard.service
>
> diff --git a/package/neard/neard.mk b/package/neard/neard.mk
> index fc92421..dd18b0a 100644
> --- a/package/neard/neard.mk
> +++ b/package/neard/neard.mk
> @@ -23,4 +23,12 @@ define NEARD_INSTALL_INIT_SYSV
> $(TARGET_DIR)/etc/init.d/S53neard
> endef
>
> +define NEARD_INSTALL_INIT_SYSTEMD
> + $(INSTALL) -D -m 644 package/neard/neard.service \
> + $(TARGET_DIR)/usr/lib/systemd/system/neard.service
> + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
> + ln -sf /usr/lib/systemd/system/neard.service \
> + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/neard.service
> +endef
> +
> $(eval $(autotools-package))
> diff --git a/package/neard/neard.service b/package/neard/neard.service
> new file mode 100644
> index 0000000..978163d
> --- /dev/null
> +++ b/package/neard/neard.service
> @@ -0,0 +1,10 @@
> +[Unit]
> +Description=Near-field communication daemon
> +After=syslog.target
> +
> +[Service]
> +ExecStart=/usr/libexec/nfc/neard -d '*'
> +Restart=always
If you use neard like that, it will fork, so you need to tell systemd
with a Type=forking and specify the PID through PIDFile=
What would be more coherent with what we currently have is simply by
passing -n (--nodaemon)
You patch will be marked as "ChangesRequested" in patchwork
> +
> +[Install]
> +WantedBy=multi-user.target
> --
> 2.0.3
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
More information about the buildroot
mailing list