From patchwork Sat Oct 31 21:27:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabe Evans X-Patchwork-Id: 538695 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 652C6141377 for ; Sun, 1 Nov 2015 08:37:01 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=hashrabbit.co header.i=@hashrabbit.co header.b=TexGiNsU; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9A15A875A3; Sat, 31 Oct 2015 21:37:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Wt4eZ99sUMNz; Sat, 31 Oct 2015 21:36:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 072878719C; Sat, 31 Oct 2015 21:36:59 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id DDA651C0B41 for ; Sat, 31 Oct 2015 21:36:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D570288135 for ; Sat, 31 Oct 2015 21:36:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yw7wGIFVZqOD for ; Sat, 31 Oct 2015 21:36:57 +0000 (UTC) X-Greylist: delayed 00:08:15 by SQLgrey-1.7.6 Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by hemlock.osuosl.org (Postfix) with ESMTPS id 211A688134 for ; Sat, 31 Oct 2015 21:36:57 +0000 (UTC) Received: by padhk11 with SMTP id hk11so107602693pad.1 for ; Sat, 31 Oct 2015 14:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hashrabbit.co; s=google; h=from:to:cc:subject:date:message-id; bh=Vl6DwCu28em4VACRi+CoEmuG55M+DeM2QbPF7eYT1Hs=; b=TexGiNsUGgdeoJEUcpneBlFmmq5xUU0eDc5IGxCPH9qCkwoe2tnQQOK8zbJAZaA3DQ lg7StPW0yjueicdC5rsDxnvuEkvc5AEPoZLg6xWhnturDl8njE8Tstzx52ALKXXWDX0V XlxwMzH0HkfsaRQd5vydDNsvW7//XgM7U8V3k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Vl6DwCu28em4VACRi+CoEmuG55M+DeM2QbPF7eYT1Hs=; b=Aq9jZx+Q+8ieXfgZ3pUoPpR7kCjvUwHs5lSk5ItJOwcrlv+T7femVp0d0M/AWtpEIG yHCMM+lTM7jWRsYl13z7EVu54y2Rni7rRyG452aWev+ZD74rotTwulzEEkGdVwLmHthD HqFLFimbPffrKXqBv3lH68yxKjJkUew/ZZchwF+PvqJFTtbqyn6Um2kpKBkdb9NqAX5V cBsQAQZykjNDMzIMsEW+7H+BaX57O9PlWgLLqoiuOpRztJkup3FTZdV8zw1NHTlLlrmr daUK0fJwlvzDmDJpZsBgr7UnvwrDkQcbaKvzNJkfxptaOyhDST5zuV+aidFJgZjmdCfM o+FA== X-Gm-Message-State: ALoCoQmbNqkiGSCUkyK/jKS2Egl9oC8OEGUCcSP8uptlgG/WS04zb0ni4Afr7IqwiG+82SqG7oit X-Received: by 10.68.221.230 with SMTP id qh6mr16652446pbc.20.1446326921899; Sat, 31 Oct 2015 14:28:41 -0700 (PDT) Received: from lab.us-west-1.compute.internal (ec2-54-183-105-171.us-west-1.compute.amazonaws.com. [54.183.105.171]) by smtp.gmail.com with ESMTPSA id d13sm15521381pbu.20.2015.10.31.14.28.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 31 Oct 2015 14:28:41 -0700 (PDT) From: Gabe Evans To: buildroot@buildroot.org Date: Sat, 31 Oct 2015 21:27:17 +0000 Message-Id: <1446326837-15874-1-git-send-email-gabe@hashrabbit.co> X-Mailer: git-send-email 1.9.1 Subject: [Buildroot] [PATCH 1/1] mosquitto: systemd support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Gabe Evans --- package/mosquitto/mosquitto.mk | 8 ++++++++ package/mosquitto/mosquitto.service | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 package/mosquitto/mosquitto.service diff --git a/package/mosquitto/mosquitto.mk b/package/mosquitto/mosquitto.mk index 73365f9..efeb32d 100644 --- a/package/mosquitto/mosquitto.mk +++ b/package/mosquitto/mosquitto.mk @@ -83,6 +83,14 @@ define MOSQUITTO_INSTALL_INIT_SYSV $(TARGET_DIR)/etc/init.d/S50mosquitto endef +define MOSQUITTO_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/mosquitto/mosquitto.service \ + $(TARGET_DIR)/usr/lib/systemd/system/mosquitto.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/mosquitto.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/mosquitto.service +endef + define MOSQUITTO_USERS mosquitto -1 nogroup -1 * - - - Mosquitto user endef diff --git a/package/mosquitto/mosquitto.service b/package/mosquitto/mosquitto.service new file mode 100644 index 0000000..2d1939d --- /dev/null +++ b/package/mosquitto/mosquitto.service @@ -0,0 +1,10 @@ +[Unit] +Description=Mosquitto MQTT broker + +[Service] +ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf +ExecReload=/bin/kill -HUP $MAINPID +Restart=always + +[Install] +WantedBy=multi-user.target